diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2023-02-19 23:03:56 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2023-02-19 23:03:56 -0800 |
commit | 9354e22ec0f22f3fbfa360fac6c57716fdb45486 (patch) | |
tree | 60902985c612b1a37c84562eeaa94047a18c5c9b | |
parent | 5e3c2413e02e04753357dd7cf0d57da8abefce92 (diff) | |
download | isort-9354e22ec0f22f3fbfa360fac6c57716fdb45486.tar.gz |
Black formatting
-rw-r--r-- | isort/core.py | 1 | ||||
-rw-r--r-- | isort/parse.py | 2 | ||||
-rw-r--r-- | isort/settings.py | 2 | ||||
-rw-r--r-- | tests/unit/test_deprecated_finders.py | 1 | ||||
-rw-r--r-- | tests/unit/test_isort.py | 1 | ||||
-rw-r--r-- | tests/unit/test_main.py | 1 |
6 files changed, 1 insertions, 7 deletions
diff --git a/isort/core.py b/isort/core.py index 297e7260..10103854 100644 --- a/isort/core.py +++ b/isort/core.py @@ -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 diff --git a/isort/parse.py b/isort/parse.py index c60938d8..614afabd 100644 --- a/isort/parse.py +++ b/isort/parse.py @@ -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( ")" ): @@ -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("#") diff --git a/isort/settings.py b/isort/settings.py index 24de2337..500275f7 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -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): diff --git a/tests/unit/test_deprecated_finders.py b/tests/unit/test_deprecated_finders.py index 3d715c2e..b60611a2 100644 --- a/tests/unit/test_deprecated_finders.py +++ b/tests/unit/test_deprecated_finders.py @@ -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()) diff --git a/tests/unit/test_isort.py b/tests/unit/test_isort.py index 5de6ce69..7b6743c7 100644 --- a/tests/unit/test_isort.py +++ b/tests/unit/test_isort.py @@ -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" diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index a3c0a90b..be86d2ae 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -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 |