mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Excluded future functorch path from linters (#81563)
In preparation for the functorch->pytorch move, this PR excludes functorch paths from lint so we avoid breaking lint when we execute the move. We will fix and re-enable lint when we're done with the merge. Why not add all these linters to the pytorch/functorch repo now and fix all the lints? Because (1) it's easier to not add them, especially if we're moving out of there soon and (2) it's difficult to reproduce the linting setup 1:1 (I tried for a bit). Test Plan: - cp functorch to functorch, run `lintrunner`, observe all pass Pull Request resolved: https://github.com/pytorch/pytorch/pull/81563 Approved by: https://github.com/ezyang
This commit is contained in:
parent
99c464ae26
commit
d82d2083e2
2
.flake8
2
.flake8
|
|
@ -22,6 +22,8 @@ exclude =
|
||||||
./docs/caffe2,
|
./docs/caffe2,
|
||||||
./docs/cpp/src,
|
./docs/cpp/src,
|
||||||
./docs/src,
|
./docs/src,
|
||||||
|
# See NOTE: [Impending functorch move]
|
||||||
|
./functorch,
|
||||||
./scripts,
|
./scripts,
|
||||||
./test/generated_type_hints_smoketest.py,
|
./test/generated_type_hints_smoketest.py,
|
||||||
./third_party,
|
./third_party,
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,11 @@ exclude_patterns = [
|
||||||
'docs/caffe2/**',
|
'docs/caffe2/**',
|
||||||
'docs/cpp/src/**',
|
'docs/cpp/src/**',
|
||||||
'docs/src/**',
|
'docs/src/**',
|
||||||
|
# NOTE: [Impending functorch move]
|
||||||
|
# In preparation for the functorch -> pytorch merge,
|
||||||
|
# we are adding the following excludes so that functorch passes
|
||||||
|
# lint when it gets merged in. Please don't delete.
|
||||||
|
'functorch/**',
|
||||||
'scripts/**',
|
'scripts/**',
|
||||||
'test/generated_type_hints_smoketest.py',
|
'test/generated_type_hints_smoketest.py',
|
||||||
'third_party/**',
|
'third_party/**',
|
||||||
|
|
@ -220,7 +225,11 @@ command = [
|
||||||
[[linter]]
|
[[linter]]
|
||||||
code = 'TYPEIGNORE'
|
code = 'TYPEIGNORE'
|
||||||
include_patterns = ['**/*.py', '**/*.pyi']
|
include_patterns = ['**/*.py', '**/*.pyi']
|
||||||
exclude_patterns = ['test/test_jit.py']
|
exclude_patterns = [
|
||||||
|
'test/test_jit.py',
|
||||||
|
# See NOTE: [Impending functorch move]
|
||||||
|
'functorch/**',
|
||||||
|
]
|
||||||
command = [
|
command = [
|
||||||
'python3',
|
'python3',
|
||||||
'tools/linter/adapters/grep_linter.py',
|
'tools/linter/adapters/grep_linter.py',
|
||||||
|
|
@ -292,6 +301,8 @@ exclude_patterns=[
|
||||||
'tools/clang_format_hash/**',
|
'tools/clang_format_hash/**',
|
||||||
'test/cpp/jit/upgrader_models/*.ptl',
|
'test/cpp/jit/upgrader_models/*.ptl',
|
||||||
'test/cpp/jit/upgrader_models/*.ptl.ff',
|
'test/cpp/jit/upgrader_models/*.ptl.ff',
|
||||||
|
# See NOTE: [Impending functorch move]
|
||||||
|
'functorch/**',
|
||||||
]
|
]
|
||||||
command = [
|
command = [
|
||||||
'python3',
|
'python3',
|
||||||
|
|
@ -311,6 +322,8 @@ exclude_patterns = [
|
||||||
'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',
|
'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',
|
||||||
'test/cpp/jit/upgrader_models/*.ptl',
|
'test/cpp/jit/upgrader_models/*.ptl',
|
||||||
'test/cpp/jit/upgrader_models/*.ptl.ff',
|
'test/cpp/jit/upgrader_models/*.ptl.ff',
|
||||||
|
# See NOTE: [Impending functorch move]
|
||||||
|
'functorch/**',
|
||||||
]
|
]
|
||||||
command = [
|
command = [
|
||||||
'python3',
|
'python3',
|
||||||
|
|
@ -340,6 +353,8 @@ exclude_patterns = [
|
||||||
'test/cpp/jit/upgrader_models/*.ptl',
|
'test/cpp/jit/upgrader_models/*.ptl',
|
||||||
'test/cpp/jit/upgrader_models/*.ptl.ff',
|
'test/cpp/jit/upgrader_models/*.ptl.ff',
|
||||||
'.lintrunner.toml',
|
'.lintrunner.toml',
|
||||||
|
# See NOTE: [Impending functorch move]
|
||||||
|
'functorch/**',
|
||||||
]
|
]
|
||||||
command = [
|
command = [
|
||||||
'python3',
|
'python3',
|
||||||
|
|
@ -421,6 +436,8 @@ exclude_patterns = [
|
||||||
'**/git-pre-commit',
|
'**/git-pre-commit',
|
||||||
'**/git-clang-format',
|
'**/git-clang-format',
|
||||||
'**/gradlew',
|
'**/gradlew',
|
||||||
|
# See NOTE: [Impending functorch move]
|
||||||
|
'functorch/**',
|
||||||
]
|
]
|
||||||
command = [
|
command = [
|
||||||
'python3',
|
'python3',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user