| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| [tool.black] |
| line-length = 80 |
| target_version = ["py38", "py39", "py310"] |
| skip-string-normalization = true |
| exclude = """ |
| /( |
| | third_party |
| | internal |
| | venv |
| )/ |
| """ |
| |
| [tool.isort] |
| profile = "black" |
| line_length = 80 |
| lines_after_imports = 2 |
| skip_glob = [ |
| "third_party", |
| "internal", |
| "venv", |
| ] |
| extend_skip_glob = "*_pb2.py" |
| length_sort = false |
| force_single_line = true |
| from_first = false |
| case_sensitive = false |
| force_sort_within_sections = true |
| order_by_type = false |
| |
| [tool.pytest.ini_options] |
| minversion = "6.0" |
| addopts = [ |
| "--cov", |
| "--no-cov-on-fail", |
| "--log-level=DEBUG", |
| "--quiet", |
| "--numprocesses=auto", |
| "--maxprocesses=16", |
| "--durations=5", |
| ] |
| norecursedirs = [ |
| "third_party", |
| "internal", |
| "venv", |
| ] |
| |
| [tool.coverage.run] |
| source = ["."] |
| disable_warnings = [ |
| "couldnt-parse", |
| ] |
| omit = [ |
| "third_party/*", |
| "internal/*", |
| "venv/*", |
| "*_test.py", |
| ] |
| |
| [tool.pylint.MASTER] |
| ignore-patterns = [ |
| ".*_pb2\\.py$", |
| ".*third_party\\/.*.py$", |
| ".*internal\\/.*.py$", |
| ".*venv\\/.*.py$", |
| ] |
| |
| [tool.pylint."MESSAGES CONTROL"] |
| disable = [ |
| "broad-except", # TODO(acewu): except them by comments if necessary |
| "consider-using-f-string", |
| "consider-using-with", # TODO(acewu): except them by comments if necessary |
| "duplicate-code", |
| "fixme", |
| "invalid-name", |
| "line-too-long", # let black handle it |
| "missing-function-docstring", |
| "missing-module-docstring", |
| "no-member", |
| "too-few-public-methods", |
| "too-many-arguments", |
| "too-many-branches", |
| "too-many-instance-attributes", |
| "too-many-lines", |
| "too-many-locals", |
| "too-many-public-methods", |
| "too-many-return-statements", |
| "too-many-statements", |
| "ungrouped-imports", # let isort handle it |
| "unspecified-encoding", |
| "wrong-import-order", # let isort handle it |
| ] |
| |
| [tool.pyright] |
| exclude = [ |
| "venv", |
| ] |
| venvPath = "." |
| venv = "venv" |
| extraPaths = [ |
| "third_party", |
| ] |
| |
| [tool.pyright.analysis] |
| typeCheckingMode = "strict" |