Skip to content

Commit 9354e22

Browse files
committedFeb 20, 2023
Black formatting
1 parent 5e3c241 commit 9354e22

File tree

6 files changed

+1
-7
lines changed

6 files changed

+1
-7
lines changed
 

‎isort/core.py

-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ def process(
359359
sort_section_pointer += len(line)
360360

361361
if not_imports:
362-
363362
if not was_in_quote and config.lines_before_imports > -1:
364363
if line.strip() == "":
365364
lines_before += line

‎isort/parse.py

-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ def file_contents(contents: str, config: Config = DEFAULT_CONFIG) -> ParsedConte
241241
and not commentless.rstrip().endswith(")")
242242
and import_index < line_count
243243
):
244-
245244
while import_index < line_count and not commentless.rstrip().endswith(
246245
")"
247246
):
@@ -532,7 +531,6 @@ def file_contents(contents: str, config: Config = DEFAULT_CONFIG) -> ParsedConte
532531
comments = []
533532

534533
if len(out_lines) > max(import_index, +1, 1) - 1:
535-
536534
last = out_lines[-1].rstrip() if out_lines else ""
537535
while (
538536
last.startswith("#")

‎isort/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def find_all_configs(path: str) -> Trie:
805805
"""
806806
trie_root = Trie("default", {})
807807

808-
for (dirpath, _, _) in os.walk(path):
808+
for dirpath, _, _ in os.walk(path):
809809
for config_file_name in CONFIG_SOURCES:
810810
potential_config_file = os.path.join(dirpath, config_file_name)
811811
if os.path.isfile(potential_config_file):

‎tests/unit/test_deprecated_finders.py

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def test_requirements_finder(tmpdir) -> None:
142142
req_file = tmpdir.join("requirements.txt")
143143
req_file.write("Django==1.11\n-e git+https://github.com/orsinium/deal.git#egg=deal\n")
144144
for path in (str(tmpdir), str(subdir)):
145-
146145
finder = finders.RequirementsFinder(config=Config(), path=path)
147146

148147
files = list(finder._get_files())

‎tests/unit/test_isort.py

-1
Original file line numberDiff line numberDiff line change
@@ -3730,7 +3730,6 @@ def test_new_lines_are_preserved() -> None:
37303730

37313731

37323732
def test_forced_separate_is_deterministic_issue_774(tmpdir) -> None:
3733-
37343733
config_file = tmpdir.join("setup.cfg")
37353734
config_file.write(
37363735
"[isort]\n"

‎tests/unit/test_main.py

-1
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,6 @@ def test_identify_imports_main(tmpdir, capsys):
10801080

10811081

10821082
def test_gitignore(capsys, tmpdir: py.path.local):
1083-
10841083
import_content = """
10851084
import b
10861085
import a

0 commit comments

Comments
 (0)