mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Update to TorchFix 0.4.0 (#119424)
`torch.library.Library` updated to `torch.library._scoped_library` in files with many tests where it seems obvious to do, otherwise `noqa: TOR901` added - see https://github.com/pytorch/pytorch/pull/118318 for more context. Pull Request resolved: https://github.com/pytorch/pytorch/pull/119424 Approved by: https://github.com/zou3519
This commit is contained in:
committed by
PyTorch MergeBot
parent
5acd1f0f7d
commit
bd9db6a9c7
20
.flake8
20
.flake8
@ -2,7 +2,7 @@
|
||||
# NOTE: **Mirror any changes** to this file the [tool.ruff] config in pyproject.toml
|
||||
# before we can fully move to use ruff
|
||||
enable-extensions = G
|
||||
select = B,C,E,F,G,P,SIM1,T4,W,B9,TOR0,TOR1,TOR2
|
||||
select = B,C,E,F,G,P,SIM1,T4,W,B9,TOR0,TOR1,TOR2,TOR9
|
||||
max-line-length = 120
|
||||
# C408 ignored because we like the dict keyword argument syntax
|
||||
# E501 is not flexible enough, we're using B950 instead
|
||||
@ -27,6 +27,9 @@ ignore =
|
||||
# TODO(kit1980): fix all TOR102 issues
|
||||
# `torch.load` without `weights_only` parameter is unsafe
|
||||
TOR102,
|
||||
# TODO(kit1980): resolve all TOR003 issues
|
||||
# pass `use_reentrant` explicitly to `checkpoint`.
|
||||
TOR003
|
||||
per-file-ignores =
|
||||
__init__.py: F401
|
||||
test/**: F821
|
||||
@ -36,6 +39,21 @@ per-file-ignores =
|
||||
torchgen/executorch/api/types/__init__.py: F401,F403
|
||||
test/dynamo/test_higher_order_ops.py: B950
|
||||
torch/testing/_internal/dynamo_test_failures.py: B950
|
||||
# TOR901 is only for test, we want to ignore it for everything else.
|
||||
# It's not easy to configure this without affecting other per-file-ignores,
|
||||
# so we explicitly list every file where it's violated outside of test.
|
||||
torch/__init__.py: F401,TOR901
|
||||
torch/_custom_op/impl.py: TOR901
|
||||
torch/_export/serde/upgrade.py: TOR901
|
||||
torch/_functorch/vmap.py: TOR901
|
||||
torch/_inductor/test_operators.py: TOR901
|
||||
torch/_library/abstract_impl.py: TOR901
|
||||
torch/_meta_registrations.py: TOR901
|
||||
torch/_prims/__init__.py: F401,TOR901
|
||||
torch/_prims/rng_prims.py: TOR901
|
||||
torch/ao/quantization/fx/_decomposed.py: TOR901
|
||||
torch/distributed/_functional_collectives.py: TOR901
|
||||
torch/distributed/_spmd/data_parallel.py: TOR901
|
||||
optional-ascii-coding = True
|
||||
exclude =
|
||||
./.git,
|
||||
|
Reference in New Issue
Block a user