Skip to content
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

Merged
merged 16 commits into from Feb 7, 2021
Merged

Closes #1327 #1851

merged 16 commits into from Feb 7, 2021

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Feb 7, 2021

No description provided.

@@ -12,6 +15,18 @@ def get_variable_name(node: _LocalVariable) -> str:
return getattr(node, 'name', '')


def looks_like_builtin(node: AnyVariableDef) -> bool:
"""
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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,
)
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

codecov bot commented Feb 7, 2021

Codecov Report

Merging #1851 (4765481) into master (d246fb5) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
...emake_python_styleguide/logic/naming/name_nodes.py 100.00% <ø> (ø)
wemake_python_styleguide/violations/naming.py 100.00% <ø> (ø)
wemake_python_styleguide/logic/naming/builtins.py 100.00% <100.00%> (ø)
wemake_python_styleguide/logic/tree/classes.py 100.00% <100.00%> (ø)
wemake_python_styleguide/logic/tree/variables.py 100.00% <100.00%> (ø)
wemake_python_styleguide/presets/topics/naming.py 100.00% <100.00%> (ø)
wemake_python_styleguide/presets/types/tree.py 100.00% <100.00%> (ø)
wemake_python_styleguide/visitors/ast/classes.py 100.00% <100.00%> (ø)
...ython_styleguide/visitors/ast/naming/validation.py 100.00% <100.00%> (ø)
...python_styleguide/visitors/ast/naming/variables.py 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d246fb5...4765481. Read the comment docs.

@sobolevn sobolevn merged commit b1270d3 into master Feb 7, 2021
@delete-merged-branch delete-merged-branch bot deleted the issue-1327 branch February 7, 2021 23:12
@sobolevn sobolevn added this to the Version 0.15 aka Python3.9 milestone Feb 7, 2021
TokenizeViolation,
)
from wemake_python_styleguide.visitors.base import BaseVisitor

_IgnoredTypes = Union[
Type[BaseViolation],
Tuple[BaseViolation, ...],
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • fixtures

@sobolevn
Copy link
Member Author

sobolevn commented Feb 8, 2021

@skarzi thanks a lot, fixed!

Sorry for rushing with the merge, but I want to release 0.15 ASAP after #1847

@skarzi
Copy link
Collaborator

skarzi commented Feb 8, 2021

You're welcome!
Sure I understand, great work as always 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants