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

Bump isort from 4.3.21 to 5.0.3 #7485

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ insert_final_newline = true
[*.py]
indent_style = space
indent_size = 4
not_skip = __init__.py

[*.{css,mustache,py}]
# Make sure that no Byte Order Marks are added
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ confidence=
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=missing-docstring,too-few-public-methods,too-many-return-statements,too-many-branches,
too-many-statements,line-too-long
too-many-statements,line-too-long,wrong-import-order

[REPORTS]

Expand Down
2 changes: 1 addition & 1 deletion dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def upload_coverage() -> None:
def sort(fix: bool = False) -> None:
print('>>>> Checking imports')
if fix:
subprocess.check_call(['isort', '-rc', '.'])
subprocess.check_call(['isort', '.'])
else:
subprocess.check_call(['isort', '--check-only'])

Expand Down
5 changes: 1 addition & 4 deletions pylint_monolith/monolith_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,13 @@ class MonolithChecker(BaseChecker):

def __init__(self, linter: Optional[PyLinter] = None) -> None:
BaseChecker.__init__(self, linter)
self.isort_obj = isort.SortImports(
file_contents='',
)

@check_messages(*(msgs.keys()))
def visit_importfrom(self, node: astroid.nodes.ImportFrom) -> None:
"""triggered when a from statement is seen"""
# We only care about imports within the monolith.
basename = get_basename(node.modname)
import_category = self.isort_obj.place_module(basename)
import_category = isort.place.module(basename)
if import_category != 'FIRSTPARTY':
return
# Get the name of the module that's doing the importing.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ git+https://github.com/Czaki/pip-check-reqs.git@master
github_webhook==1.0.4
google-api-python-client==1.9.3
inflect==4.1.0
isort==4.3.21
isort==5.0.3
jsbeautifier==1.11.0
markdown==3.2.2
matplotlib==3.2.2
Expand Down