Source

flake8 / flake8 / util.py

The branch 'refactor' does not exist.
Diff from to

File flake8/util.py

     return _NOQA.search(content) is not None
 
 
-def _initpep8():
+def _initpep8(config_file=True):
     # default pep8 setup
     global pep8style
     import pep8
     if pep8style is None:
-        pep8style = pep8.StyleGuide(config_file=True)
+        pep8style = pep8.StyleGuide(config_file=config_file)
     pep8style.options.physical_checks = pep8.find_checks('physical_line')
     pep8style.options.logical_checks = pep8.find_checks('logical_line')
     pep8style.options.counters = dict.fromkeys(pep8.BENCHMARK_KEYS, 0)
     pep8style.options.messages = {}
-    pep8style.options.max_line_length = 79
+    if not pep8style.options.max_line_length:
+        pep8style.options.max_line_length = 79
     pep8style.args = []
     return pep8style