python-version = "3.12"
project-includes = [
"torch",
"caffe2",
"tools",
"test/test_bundled_images.py",
"test/test_complex.py",
"test/test_datapipe.py",
"test/test_futures.py",
"test/test_numpy_interop.py",
"test/test_type_hints.py",
"test/test_type_info.py",
"test/test_utils.py",
]
project-excludes = [
"torch/_inductor/runtime/triton_heuristics.py",
"torch/_inductor/runtime/triton_helpers.py",
"torch/_inductor/runtime/halide_helpers.py",
"torch/utils/data/typing.ipynb",
"torch/utils/data/dataframes_pipes.ipynb",
"torch/utils/data/standard_pipes.ipynb",
"torch/onnx/_internal/exporter/_torchlib/ops/nn.py",
"torch/include/**",
"torch/csrc/**",
"torch/distributed/elastic/agent/server/api.py",
"torch/distributed/nccl4py_backend.py",
"torch/testing/_internal/**",
"torch/distributed/fsdp/fully_sharded_data_parallel.py",
"torch/ao/quantization/pt2e/_affine_quantization.py",
"torch/nn/modules/pooling.py",
"torch/nn/parallel/_functions.py",
"torch/_appdirs.py",
"torch/multiprocessing/pool.py",
"torch/overrides.py",
"*/__pycache__/**",
"*/.*",
"torch/_inductor/kernel/vendored_templates/cutedsl/kernels/**",
"torch/_inductor/kernel/vendored_templates/cutedsl/dense_blockscaled_gemm_persistent.py",
"torch/_inductor/kernel/vendored_templates/flydsl/kernels/**",
"torch/_vendor/quack/**",
]
ignore-missing-imports = [
"torch._C._xpu_beginAllocateCurrentThreadToPool",
"torch._C._xpu_endAllocateToPool",
"torch._C._xpu_releasePool",
"torch._C._xpu_XPUAllocator",
"torch._C._XPUMemPool",
"torch._C._StaticXpuLauncher",
"torch.profiler._cuspy._cupti_stubs",
"torch._C._jit_tree_views.*",
"torch.for_onnx.onnx.*",
"torch.ao.quantization.experimental.apot_utils.*",
"torch.ao.quantization.experimental.quantizer.*",
"torch.ao.quantization.experimental.observer.*",
"torch.ao.quantization.experimental.APoT_tensor.*",
"torch.ao.quantization.experimental.fake_quantize_function.*",
"torch.ao.quantization.experimental.fake_quantize.*",
"triton.*",
"tensorflow.*",
"tensorboard.*",
"matplotlib.*",
"numpy.*",
"sympy.*",
"hypothesis.*",
"tqdm.*",
"multiprocessing.*",
"setuptools.*",
"distutils.*",
"nvd3.*",
"future.utils.*",
"past.builtins.*",
"numba.*",
"nvMatmulHeuristics",
"PIL.*",
"moviepy.*",
"cv2.*",
"torchvision.*",
"pycuda.*",
"tensorrt.*",
"tornado.*",
"pydot.*",
"networkx.*",
"scipy.*",
"IPython.*",
"google.protobuf.textformat.*",
"lmdb.*",
"mpi4py.*",
"skimage.*",
"librosa.*",
"mypy.*",
"xml.*",
"boto3.*",
"dill.*",
"usort.*",
"cutlass.*",
"cutlass_library.*",
"flydsl.*",
"cuda.bindings.*",
"cuda.pathfinder",
"deeplearning.*",
"einops.*",
"libfb.*",
"torch.fb.*",
"torch.*.fb.*",
"torch_xla.*",
"onnx.*",
"onnxruntime.*",
"onnxscript.*",
"redis.*",
"tabulate.*",
"shtab.*",
]
untyped-def-behavior = "check-and-infer-return-any"
errors.implicitly-defined-attribute = false
errors.bad-param-name-override = false
errors.implicit-import = false
errors.deprecated = false
permissive-ignores = true
replace-imports-with-any = ["!sympy.printing.*", "sympy.*", "onnxscript.onnx_opset.*", "networkx.*"]
search-path = ["tools/experimental"]
enable-fallback-search-path = true
[[sub-config]]
matches = "torch/_dynamo/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
[[sub-config]]
matches = "torch/_dispatch/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
[[sub-config]]
matches = "torch/_subclasses/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
[[sub-config]]
matches = "torch/_functorch/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
[[sub-config]]
matches = "torch/fx/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/__init__.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
[[sub-config]]
matches = "torch/_numpy/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/_export/utils.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/_export/non_strict_utils.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/_export/wrappers.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/_export/serde/schema_check.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/_export/serde/union.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/utils/_sympy/functions.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/utils/_sympy/numbers.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/utils/_sympy/singleton_int.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/utils/_sympy/interp.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/utils/_sympy/symbol.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/optim/optimizer.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/optim/adamw.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/optim/_functional.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/_lazy/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "torch/_inductor/fx_passes/serialized_patterns/**"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "tools/experimental/torchfuzz/codegen.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "tools/experimental/torchfuzz/cuda/_codegen.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "tools/experimental/torchfuzz/fuzzer.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "tools/experimental/torchfuzz/ops_fuzzer.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "tools/experimental/torchfuzz/tensor_descriptor.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "tools/experimental/torchfuzz/tensor_fuzzer.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true
[[sub-config]]
matches = "tools/experimental/torchfuzz/visualize_graph.py"
[sub-config.errors]
implicit-import = false
implicit-any = true
bad-param-name-override = false
unannotated-return = true
unannotated-parameter = true
unannotated-attribute = true