summaryrefslogtreecommitdiff
path: root/flake8/hooks.py
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-02-17 20:47:45 -0600
committerIan Cordasco <graffatcolmingov@gmail.com>2016-02-17 20:57:24 -0600
commit533d222f525d0d8c0fecf392d6ec7d211af1d897 (patch)
treef18427267198a0760eb1b3136e5282d6c3370d5a /flake8/hooks.py
parentb25ad979a608ecedc2f9f08c027383765c50f59b (diff)
downloadflake8-bug/122.tar.gz
Correct usage config_file StyleGuide parameterbug/122
Previously, we passed the location for our user config file to the StyleGuide. This was intended to be a way to tell pep8's StyleGuide to use that as a user config file, but instead that became the default for the --config command-line option. This caused that to have higher priority than the project configuration file. Closes #122
Diffstat (limited to 'flake8/hooks.py')
-rw-r--r--flake8/hooks.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/flake8/hooks.py b/flake8/hooks.py
index 14f844e..a3a5497 100644
--- a/flake8/hooks.py
+++ b/flake8/hooks.py
@@ -14,7 +14,6 @@ except ImportError: # Python 2
from flake8 import compat
from flake8.engine import get_parser, get_style_guide
-from flake8.main import DEFAULT_CONFIG
def git_hook(complexity=-1, strict=False, ignore=None, lazy=False):
@@ -51,8 +50,7 @@ def git_hook(complexity=-1, strict=False, ignore=None, lazy=False):
tmpdir = tempfile.mkdtemp()
- flake8_style = get_style_guide(config_file=DEFAULT_CONFIG, paths=['.'],
- **options)
+ flake8_style = get_style_guide(paths=['.'], **options)
filepatterns = flake8_style.options.filename
# Copy staged versions to temporary directory
@@ -102,7 +100,7 @@ def hg_hook(ui, repo, **kwargs):
complexity = ui.config('flake8', 'complexity', default=-1)
strict = ui.configbool('flake8', 'strict', default=True)
ignore = ui.config('flake8', 'ignore', default=None)
- config = ui.config('flake8', 'config', default=DEFAULT_CONFIG)
+ config = ui.config('flake8', 'config', default=None)
paths = _get_files(repo, **kwargs)