Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 147401d

Browse files
committed
only set loglevel config when running cli
by always setting the log level, you enforce that log level on every project that attempts to depend on the pep257 module. instead logging should be enabled for debug when needed. this fixes a bug in the flake8-docstrings plugin for flake8
1 parent 8307b73 commit 147401d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pep257.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
except ImportError: # Python 2.x
2626
from configparser import RawConfigParser
2727

28-
log = logging.getLogger()
29-
log.setLevel(logging.DEBUG)
28+
log = logging.getLogger(__name__)
3029

3130

3231
try:
@@ -546,6 +545,7 @@ def setup_stream_handler(options):
546545

547546

548547
def run_pep257():
548+
log.setLevel(logging.DEBUG)
549549
opt_parser = get_option_parser()
550550
# setup the logger before parsing the config file, so that command line
551551
# arguments for debug / verbose will be printed.

0 commit comments

Comments
 (0)