mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
[BE][Easy]: add some PLR pylint checks and exclusions to ruff (#114519)
Add a couple of additional checks and exclusions Pull Request resolved: https://github.com/pytorch/pytorch/pull/114519 Approved by: https://github.com/jansel
This commit is contained in:
parent
74e10f0f60
commit
9f073ae304
2 changed files with 10 additions and 1 deletions
|
|
@ -1855,7 +1855,6 @@ class BenchmarkRunner:
|
|||
def skip_models_due_to_control_flow(self):
|
||||
return set()
|
||||
|
||||
@property
|
||||
def get_tolerance_and_cosine_flag(self, is_training, current_device, name):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,10 @@ select = [
|
|||
"PIE807",
|
||||
"PIE810",
|
||||
"PLE",
|
||||
"PLR0133", # constant comparison
|
||||
"PLR0206", # property with params
|
||||
"PLR1722", # use sys exit
|
||||
"PLR6201", # set membership test
|
||||
"PLW3301", # nested min max
|
||||
"PT006", # TODO: enable more PT rules
|
||||
"PT022",
|
||||
|
|
@ -104,9 +107,16 @@ select = [
|
|||
[tool.ruff.per-file-ignores]
|
||||
"__init__.py" = ["F401"]
|
||||
"test/jit/**" = [
|
||||
"PLR0133", # tests require this for JIT
|
||||
"PYI",
|
||||
"UP", # We don't want to modify the jit test as they test specify syntax
|
||||
]
|
||||
"test/test_jit.py" = [
|
||||
"PLR0133", # tests require this for JIT
|
||||
"PYI",
|
||||
"UP", # We don't want to modify the jit test as they test specify syntax
|
||||
]
|
||||
|
||||
"torch/onnx/**" = [
|
||||
"UP037", # ONNX does runtime type checking
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue