mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:35:58 +00:00
24 lines
410 B
Python
24 lines
410 B
Python
import logging
|
|
from logging import getLogger
|
|
|
|
# Ok
|
|
logging.getLogger(__name__)
|
|
logging.getLogger(name=__name__)
|
|
logging.getLogger("custom")
|
|
logging.getLogger(name="custom")
|
|
|
|
# LOG002
|
|
getLogger(__file__)
|
|
logging.getLogger(name=__file__)
|
|
|
|
logging.getLogger(__cached__)
|
|
getLogger(name=__cached__)
|
|
|
|
|
|
# Override `logging.getLogger`
|
|
class logging:
|
|
def getLogger(self):
|
|
pass
|
|
|
|
|
|
logging.getLogger(__file__)
|