Skip to content

Commit

Permalink
chore(sdk): ignore unused import errors in __init__.py files generally (
Browse files Browse the repository at this point in the history
wandb#5045)

* Have ruff and flake8 only ignore a subset of errors in __init__.py files (rather than ignore the files completely)
  • Loading branch information
moredatarequired authored Mar 16, 2023
1 parent bfae7f0 commit f72d269
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .flake8-base
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ exclude =
./tests/pytest_tests/unit_tests_old/
./tests/functional_tests/t0_main/metaflow/
./tests/functional_tests/t0_main/fastai/t1_v1.py
./wandb/__init__.py
./wandb/wandb_torch.py
./wandb/bin
./wandb/data/
Expand All @@ -39,6 +38,8 @@ exclude =
*/wandb/offline-run-*/files/code/

per-file-ignores =
wandb/cli/cli.py:C901,I202
wandb/wandb_controller.py:N803,N806
wandb/filesync/step_checksum.py:B023
**/__init__.py:E402,F401
wandb/__init__.py:E402,F401,I001
wandb/cli/cli.py:C901,I202
wandb/filesync/step_checksum.py:B023
wandb/wandb_controller.py:N803,N806
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ exclude = [
"tests/functional_tests/t0_main/metaflow",
"tests/pytest_tests/assets/fixtures/train.py",
"tests/pytest_tests/unit_tests_old",
"wandb/__init__.py",
"wandb/bin",
"wandb/data",
"wandb/env.py",
Expand All @@ -86,9 +85,11 @@ target-version = "py37"
split-on-trailing-comma = false

[tool.ruff.per-file-ignores]
"**/__init__.py" = ["E402", "F401"]
"wandb/__init__.py" = ["I001"]
"wandb/cli/cli.py" = ["C901"]
"wandb/wandb_controller.py" = ["N803", "N806"]
"wandb/filesync/step_checksum.py" = ["B023"]
"wandb/wandb_controller.py" = ["N803", "N806"]

[tool.ruff.pydocstyle]
convention = "google"
Expand Down

0 comments on commit f72d269

Please sign in to comment.