Skip to content

Commit

Permalink
Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Feb 20, 2023
1 parent 5e3c241 commit 9354e22
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion isort/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ def process(
sort_section_pointer += len(line)

if not_imports:

if not was_in_quote and config.lines_before_imports > -1:
if line.strip() == "":
lines_before += line
Expand Down
2 changes: 0 additions & 2 deletions isort/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ def file_contents(contents: str, config: Config = DEFAULT_CONFIG) -> ParsedConte
and not commentless.rstrip().endswith(")")
and import_index < line_count
):

while import_index < line_count and not commentless.rstrip().endswith(
")"
):
Expand Down Expand Up @@ -532,7 +531,6 @@ def file_contents(contents: str, config: Config = DEFAULT_CONFIG) -> ParsedConte
comments = []

if len(out_lines) > max(import_index, +1, 1) - 1:

last = out_lines[-1].rstrip() if out_lines else ""
while (
last.startswith("#")
Expand Down
2 changes: 1 addition & 1 deletion isort/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def find_all_configs(path: str) -> Trie:
"""
trie_root = Trie("default", {})

for (dirpath, _, _) in os.walk(path):
for dirpath, _, _ in os.walk(path):
for config_file_name in CONFIG_SOURCES:
potential_config_file = os.path.join(dirpath, config_file_name)
if os.path.isfile(potential_config_file):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_deprecated_finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ def test_requirements_finder(tmpdir) -> None:
req_file = tmpdir.join("requirements.txt")
req_file.write("Django==1.11\n-e git+https://github.com/orsinium/deal.git#egg=deal\n")
for path in (str(tmpdir), str(subdir)):

finder = finders.RequirementsFinder(config=Config(), path=path)

files = list(finder._get_files())
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_isort.py
Original file line number Diff line number Diff line change
Expand Up @@ -3730,7 +3730,6 @@ def test_new_lines_are_preserved() -> None:


def test_forced_separate_is_deterministic_issue_774(tmpdir) -> None:

config_file = tmpdir.join("setup.cfg")
config_file.write(
"[isort]\n"
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,6 @@ def test_identify_imports_main(tmpdir, capsys):


def test_gitignore(capsys, tmpdir: py.path.local):

import_content = """
import b
import a
Expand Down

0 comments on commit 9354e22

Please sign in to comment.