diff options
| author | Timothy Crosley <timothy.crosley@gmail.com> | 2022-12-29 19:31:47 -0800 |
|---|---|---|
| committer | Timothy Crosley <timothy.crosley@gmail.com> | 2022-12-29 19:31:47 -0800 |
| commit | b20228c9820f94633eb9d5e38f976a0e98bdb16c (patch) | |
| tree | 1c7a422a987b6ae74842b8f955dd87611949e94f | |
| parent | ec781c37a5411b4f403e753ac200c7df9c6e575e (diff) | |
| download | isort-b20228c9820f94633eb9d5e38f976a0e98bdb16c.tar.gz | |
Restore cruft usage
| -rw-r--r-- | .cruft.json | 2 | ||||
| -rw-r--r-- | isort/deprecated/finders.py | 2 | ||||
| -rwxr-xr-x | scripts/lint.sh | 2 | ||||
| -rw-r--r-- | tests/unit/test_main.py | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/.cruft.json b/.cruft.json index b471661a..4457efe6 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/timothycrosley/cookiecutter-python/", - "commit": "4f2a3601ad12239bf6cbeedba8ecf297690ab07f", + "commit": "71391fd9999067ef4b38aa05e7116087fac431f8", "context": { "cookiecutter": { "full_name": "Timothy Crosley", diff --git a/isort/deprecated/finders.py b/isort/deprecated/finders.py index 52bd7cf8..e80a59a0 100644 --- a/isort/deprecated/finders.py +++ b/isort/deprecated/finders.py @@ -262,7 +262,7 @@ class ReqsBaseFinder(BaseFinder): if os.path.isfile(path): path = os.path.dirname(path) - for path in self._get_parents(path): + for path in self._get_parents(path): # noqa yield from self._get_files_from_dir(path) def _normalize_name(self, name: str) -> str: diff --git a/scripts/lint.sh b/scripts/lint.sh index 1935289c..ffba2fb5 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -2,7 +2,7 @@ set -euxo pipefail # TODO: reneable cruft when it takes Python restriction -#poetry run cruft check +poetry run cruft check poetry run mypy -p isort -p tests poetry run black --target-version py37 --check . poetry run isort --profile hug --check --diff isort/ tests/ diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index 4c16cf51..a3c0a90b 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -1068,15 +1068,15 @@ def test_identify_imports_main(tmpdir, capsys): main.identify_imports_main(["-", "--packages"], stdin=as_stream(file_content)) out, error = capsys.readouterr() - len(out.split("\n")) == 2 + assert len(out.split("\n")) == 6 main.identify_imports_main(["-", "--modules"], stdin=as_stream(file_content)) out, error = capsys.readouterr() - len(out.split("\n")) == 2 + assert len(out.split("\n")) == 3 main.identify_imports_main(["-", "--attributes"], stdin=as_stream(file_content)) out, error = capsys.readouterr() - len(out.split("\n")) == 2 + assert len(out.split("\n")) == 3 def test_gitignore(capsys, tmpdir: py.path.local): |
