mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Update pyrefly config for better codenav (#161200)
This fixes behavior in codenav by switching from `replace_imports_with_any` to `ignore-missing-imports` Pull Request resolved: https://github.com/pytorch/pytorch/pull/161200 Approved by: https://github.com/aorenste, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
bcfe1b2d71
commit
f521e82a4e
19
pyrefly.toml
19
pyrefly.toml
@ -1,4 +1,4 @@
|
||||
project_includes = [
|
||||
project-includes = [
|
||||
"torch",
|
||||
"caffe2",
|
||||
"test/test_bundled_images.py",
|
||||
@ -7,12 +7,11 @@ project_includes = [
|
||||
"test/test_datapipe.py",
|
||||
"test/test_futures.py",
|
||||
"test/test_numpy_interop.py",
|
||||
"test/test_torch.py",
|
||||
"test/test_type_hints.py",
|
||||
"test/test_type_info.py",
|
||||
"test/test_utils.py",
|
||||
]
|
||||
project_excludes = [
|
||||
project-excludes = [
|
||||
"torch/include/**",
|
||||
"torch/csrc/**",
|
||||
"torch/distributed/elastic/agent/server/api.py",
|
||||
@ -27,7 +26,7 @@ project_excludes = [
|
||||
"*/__pycache__/**",
|
||||
"*/.*",
|
||||
]
|
||||
replace_imports_with_any = [
|
||||
ignore-missing-imports = [
|
||||
"torch._C._jit_tree_views.*",
|
||||
"torch.for_onnx.onnx.*",
|
||||
"torch.ao.quantization.experimental.apot_utils.*",
|
||||
@ -86,3 +85,15 @@ replace_imports_with_any = [
|
||||
]
|
||||
|
||||
untyped_def_behavior = "check-and-infer-return-any"
|
||||
|
||||
# Shut off noisy errors
|
||||
errors.implicit-import = false
|
||||
|
||||
# We exclude test_torch.py because it is full of errors, but most functions lack type signatures,
|
||||
# and mypy.ini specifies `check_untyped_defs = False` for this file.
|
||||
# If you check even the unannotated stuff mypy produces 322 errors.
|
||||
# "test/test_torch.py",
|
||||
# Uncomment this file to check
|
||||
# [[tool.pyrefly.sub-config]]
|
||||
# matches = "test/test_torch.py"
|
||||
# untyped-def-behavior = "skip-and-infer-return-any"
|
||||
|
Reference in New Issue
Block a user