Skip to content

Commit

Permalink
Restore cruft usage
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Dec 30, 2022
1 parent ec781c3 commit b20228c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/timothycrosley/cookiecutter-python/",
"commit": "4f2a3601ad12239bf6cbeedba8ecf297690ab07f",
"commit": "71391fd9999067ef4b38aa05e7116087fac431f8",
"context": {
"cookiecutter": {
"full_name": "Timothy Crosley",
Expand Down
2 changes: 1 addition & 1 deletion isort/deprecated/finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _get_files(self) -> Iterator[str]:
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:
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b20228c

Please sign in to comment.