-
Notifications
You must be signed in to change notification settings - Fork 205
Expand file tree
/
Copy pathruff.toml
More file actions
23 lines (20 loc) · 1.98 KB
/
Copy pathruff.toml
File metadata and controls
23 lines (20 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
extend = "../ruff.toml"
# Paths are listed with and without the src/ prefix so ignores work both
# when ruff is run from the repo root (pre-commit passes src/... paths)
# and when run from within src/ directly.
[lint.per-file-ignores]
"{src/,}qai_hub_models/extern/*" = ["PGH004", "TID251", "ANN"] # these files are copied from other packages
"{src/,}qai_hub_models/models/*/external_repos/*" = ["ALL"] # cloned external repos, not our code
"{src/,}qai_hub_models/models/_shared/lm_driver/*" = ["ALL"] # cloned from GenAILab, not our code
"{src/,}qai_hub_models/__init__.py" = ["TID251"] # re-exports from qai_hub_models.common
"{src/,}qai_hub_models/models/common.py" = ["TID251"] # deprecated shim that mirrors qai_hub_models.common
"**/qdc/device_scripts/geniex_pytest/*" = ["INP", "SIM117", "SIM905"] # device-side templates packed into the QDC artifact zip; placeholders like "{CTX_LIST}" are runtime-substituted, not literals
[lint.flake8-tidy-imports.banned-api]
"numba".msg = "Do not directly import from numba, as it is an optional dependency. Safely import from qai_hub_models.extern.numba instead."
"xtcocotools".msg = "xtcocotools is no longer maintained, and should be avoided. A minimal version of it is provided at qai_hub_models.extern.xtcocotools."
"git".msg = "Git requires git to be installed. All git imports outside of the scripts/ folder must be surrounded by a try/catch ImportError statement, which should point the user to https://github.com/git-guides/install-git. After surrounding the import with a try/catch statement, you may ignore this warning with '#noqa: TID251'. See maybe_clone_git_repo in utils/asset_loaders for an example."
"qai_hub_models.models.common".msg = "Do not import from qai_hub_models.models.common. Import from qai_hub_models directly instead."
"qai_hub_models.common".msg = "Do not import from qai_hub_models.common. Import from qai_hub_models directly instead."
[lint.isort]
known-first-party = ["qai_hub_models"]
known-third-party = ["aimet_onnx", "aimet_common"]