summaryrefslogtreecommitdiff
path: root/flake8
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-02-21 13:09:44 -0600
committerIan Cordasco <graffatcolmingov@gmail.com>2016-02-21 13:09:44 -0600
commit1312e4e0ef4a6bb372178a67a92dcc113356ea49 (patch)
treef492df0309813d576b131ded3f1eabd1335c63c5 /flake8
parent1b91c8d66ab6f15c2b5946c5ceba9fe907a3976e (diff)
downloadflake8-1312e4e0ef4a6bb372178a67a92dcc113356ea49.tar.gz
Add mypy env
There are still kinks to be worked out but this works reasonably well. This will fail until we can figure out how to import things from the typing module for the type: comments only. We do not want to add a dependency on that backport only for this mypy env.
Diffstat (limited to 'flake8')
-rw-r--r--flake8/style_guide.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/flake8/style_guide.py b/flake8/style_guide.py
index 5deff7a..c3b3d5f 100644
--- a/flake8/style_guide.py
+++ b/flake8/style_guide.py
@@ -74,7 +74,7 @@ class StyleGuide(object):
self._decision_cache = {}
def is_user_selected(self, code):
- # type: (Error) -> Union[Selected, Ignored]
+ # type: (str) -> Union[Selected, Ignored]
"""Determine if the code has been selected by the user.
:param str code:
@@ -95,7 +95,7 @@ class StyleGuide(object):
return Ignored.Implicitly
def is_user_ignored(self, code):
- # type: (Error) -> Union[Selected, Ignored]
+ # type: (str) -> Union[Selected, Ignored]
"""Determine if the code has been ignored by the user.
:param str code:
@@ -123,7 +123,7 @@ class StyleGuide(object):
return Decision.Ignored
def should_report_error(self, code):
- # type: (Error) -> Decision
+ # type: (str) -> Decision
"""Determine if the error code should be reported or ignored.
This method only cares about the select and ignore rules as specified
@@ -159,6 +159,7 @@ class StyleGuide(object):
return decision
def is_inline_ignored(self, error):
+ # type: (Error) -> bool
"""Determine if an comment has been added to ignore this line."""
# TODO(sigmavirus24): Determine how to handle stdin with linecache
if self.options.disable_noqa: