mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[BE][Ez]: Update ruff to 0.12.2 (#157937)
Updates to the latest version of ruff and apply some fixes that it flagged and silence a few new lints Pull Request resolved: https://github.com/pytorch/pytorch/pull/157937 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
0d17029fea
commit
7a08755c5f
@ -130,6 +130,7 @@ ignore = [
|
||||
"E741",
|
||||
"EXE001",
|
||||
"F405",
|
||||
"FURB122", # writelines
|
||||
# these ignores are from flake8-logging-format; please fix!
|
||||
"G101",
|
||||
# these ignores are from ruff NPY; please fix!
|
||||
@ -152,6 +153,7 @@ ignore = [
|
||||
"SIM117",
|
||||
"SIM118",
|
||||
"UP007", # keep-runtime-typing
|
||||
"UP045", # keep-runtime-typing
|
||||
"TC006",
|
||||
]
|
||||
select = [
|
||||
@ -233,6 +235,10 @@ select = [
|
||||
"YTT",
|
||||
]
|
||||
|
||||
[tool.ruff.lint.pyupgrade]
|
||||
# Preserve types, even if a file imports `from __future__ import annotations`.
|
||||
keep-runtime-typing = true
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = [
|
||||
"F401",
|
||||
|
Reference in New Issue
Block a user