|
|
|
|
|
merge_base_with = 'main' |
|
|
|
|
|
[[linter]] |
|
|
code = 'RUFF' |
|
|
include_patterns = [ |
|
|
'**/*.py', |
|
|
'**/*.pyi', |
|
|
] |
|
|
exclude_patterns = [ |
|
|
'tests/models/**', |
|
|
] |
|
|
command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'ruff_linter', |
|
|
'--config=pyproject.toml', |
|
|
'@{{PATHSFILE}}' |
|
|
] |
|
|
init_command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'pip_init', |
|
|
'--dry-run={{DRYRUN}}', |
|
|
'--requirement=requirements/lintrunner/requirements.txt', |
|
|
] |
|
|
is_formatter = true |
|
|
|
|
|
[[linter]] |
|
|
code = 'MYPY' |
|
|
include_patterns = [ |
|
|
'onnxscript/**/*.py', |
|
|
'onnxscript/**/*.pyi', |
|
|
] |
|
|
exclude_patterns = [ |
|
|
'tests/**', |
|
|
|
|
|
'onnxscript/converter_test.py', |
|
|
'onnxscript/converter.py', |
|
|
'onnxscript/evaluator_test.py', |
|
|
'onnxscript/evaluator.py', |
|
|
'onnxscript/onnx_types.py', |
|
|
'onnxscript/**/*_test.py', |
|
|
'onnxscript/function_libs/torch_lib/ops/**', |
|
|
'onnxscript/optimizer/_legacy/evaluator.py', |
|
|
'onnxscript/optimizer/_legacy/constant_folding.py', |
|
|
'onnxscript/rewriter/onnxruntime/transformers/fastgelu.py', |
|
|
'onnxscript/rewriter/onnxruntime/instance_to_group_normalization.py', |
|
|
'onnxscript/_legacy_ir/irbuilder.py', |
|
|
'onnxscript/rewriter/onnxruntime/transformers/multihead_attention.py', |
|
|
'onnxscript/tools/function_unittest_producer.py', |
|
|
'onnxscript/_legacy_ir/visitor.py', |
|
|
'onnxscript/rewriter/onnxruntime/transformers/layernorm.py', |
|
|
'onnxscript/rewriter/generic_pattern.py', |
|
|
] |
|
|
command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'mypy_linter', |
|
|
'--config=pyproject.toml', |
|
|
'--show-disable', |
|
|
'--', |
|
|
'@{{PATHSFILE}}' |
|
|
] |
|
|
init_command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'pip_init', |
|
|
'--dry-run={{DRYRUN}}', |
|
|
'--requirement=requirements/lintrunner/requirements.txt', |
|
|
] |
|
|
|
|
|
[[linter]] |
|
|
code = 'RUFF-FORMAT' |
|
|
include_patterns = [ |
|
|
'**/*.py', |
|
|
] |
|
|
exclude_patterns = [ |
|
|
'tests/onnx_backend_test_code/**', |
|
|
] |
|
|
command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'ruff_format_linter', |
|
|
'--', |
|
|
'@{{PATHSFILE}}' |
|
|
] |
|
|
init_command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'pip_init', |
|
|
'--dry-run={{DRYRUN}}', |
|
|
'--requirement=requirements/lintrunner/requirements.txt', |
|
|
] |
|
|
is_formatter = true |
|
|
|
|
|
[[linter]] |
|
|
code = 'PYLINT' |
|
|
include_patterns = [ |
|
|
'**/*.py', |
|
|
] |
|
|
exclude_patterns = [ |
|
|
'examples/**', |
|
|
'docs/examples/**', |
|
|
'docs/tutorial/examples/**', |
|
|
'onnxscript/converter_test.py', |
|
|
'tests/functions/**', |
|
|
'tests/models/**', |
|
|
'tests/onnx_backend_test_code/**', |
|
|
'onnxscript/optimizer/**', |
|
|
'onnxscript/rewriter/**', |
|
|
'onnxscript/_legacy_ir/**', |
|
|
] |
|
|
command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'pylint_linter', |
|
|
'--rcfile=pyproject_pylint.toml', |
|
|
'--show-disable', |
|
|
'--', |
|
|
'@{{PATHSFILE}}' |
|
|
] |
|
|
init_command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'pip_init', |
|
|
'--dry-run={{DRYRUN}}', |
|
|
'--requirement=requirements/lintrunner/requirements.txt', |
|
|
] |
|
|
|
|
|
[[linter]] |
|
|
code = 'EDITORCONFIG-CHECKER' |
|
|
include_patterns = ['**'] |
|
|
exclude_patterns = [ |
|
|
'**/*.ipynb', |
|
|
'**/*.onnx', |
|
|
'**/*.pb' |
|
|
] |
|
|
command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'editorconfig_checker_linter', |
|
|
'--', |
|
|
'@{{PATHSFILE}}' |
|
|
] |
|
|
init_command = [ |
|
|
'python', |
|
|
'-m', |
|
|
'lintrunner_adapters', |
|
|
'run', |
|
|
'pip_init', |
|
|
'--dry-run={{DRYRUN}}', |
|
|
'--requirement=requirements/lintrunner/requirements.txt', |
|
|
] |
|
|
|