New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #1327 #1851
Closes #1327 #1851
Conversation
@@ -12,6 +15,18 @@ def get_variable_name(node: _LocalVariable) -> str: | |||
return getattr(node, 'name', '') | |||
|
|||
|
|||
def looks_like_builtin(node: AnyVariableDef) -> bool: | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
P102 docstring does contain unindexed parameters
@@ -4,17 +4,13 @@ | |||
|
|||
from typing_extensions import Final | |||
|
|||
from wemake_python_styleguide.constants import UNUSED_PLACEHOLDER | |||
from wemake_python_styleguide.constants import UNUSED_PLACEHOLDER, BUILTINS_WHITELIST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'wemake_python_styleguide.constants.UNUSED_PLACEHOLDER' imported but unused
@@ -4,17 +4,13 @@ | |||
|
|||
from typing_extensions import Final | |||
|
|||
from wemake_python_styleguide.constants import UNUSED_PLACEHOLDER | |||
from wemake_python_styleguide.constants import UNUSED_PLACEHOLDER, BUILTINS_WHITELIST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
I001 isort found an import in the wrong position
@@ -4,17 +4,13 @@ | |||
|
|||
from typing_extensions import Final | |||
|
|||
from wemake_python_styleguide.constants import UNUSED_PLACEHOLDER | |||
from wemake_python_styleguide.constants import UNUSED_PLACEHOLDER, BUILTINS_WHITELIST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
E501 line too long (85 > 80 characters)
_NamingPredicate( | ||
lambda name: access.is_unused(name) and len(name) > 1, | ||
naming.WrongUnusedVariableNameViolation, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
C812 missing trailing comma
def __init__(self): | ||
... | ||
""" | ||
from wemake_python_styleguide.violations.naming import UnreadableNameViolation, UpperCaseAttributeViolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
I001 isort found an import in the wrong position
def __init__(self): | ||
... | ||
""" | ||
from wemake_python_styleguide.violations.naming import UnreadableNameViolation, UpperCaseAttributeViolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
E501 line too long (107 > 80 characters)
Codecov Report
@@ Coverage Diff @@
## master #1851 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 107 109 +2
Lines 6005 6038 +33
Branches 1346 1348 +2
=========================================
+ Hits 6005 6038 +33
Continue to review full report at Codecov.
|
TokenizeViolation, | ||
) | ||
from wemake_python_styleguide.visitors.base import BaseVisitor | ||
|
||
_IgnoredTypes = Union[ | ||
Type[BaseViolation], | ||
Tuple[BaseViolation, ...], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it should be:
Tuple[Type[BaseViolation], ...],
mode, | ||
argument, | ||
): | ||
"""Ensures that special names for arguments are restricted.""" | ||
tree = parse_ast_tree(mode(code.format(argument))) | ||
with suppress(SyntaxError): | ||
# We use `suppress` here because some fixutres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- fixtures
You're welcome! |
No description provided.