61 lines
1.8 KiB
TOML
61 lines
1.8 KiB
TOML
[tool.ruff]
|
|
# https://docs.astral.sh/ruff/configuration/
|
|
target-version = "py38"
|
|
line-length = 79
|
|
extend-exclude = [
|
|
"_template",
|
|
"*_pb2*.py*",
|
|
]
|
|
output-format = "concise"
|
|
|
|
[tool.ruff.lint]
|
|
# https://docs.astral.sh/ruff/linter/#rule-selection
|
|
# pylint: https://github.com/astral-sh/ruff/issues/970
|
|
select = [
|
|
"I", # isort
|
|
"F", # pyflakes
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"PLC", # pylint convention
|
|
"PLE", # pylint error
|
|
"Q", # flake8-quotes
|
|
"A", # flake8-builtins
|
|
]
|
|
ignore = [
|
|
"E501", # line-too-long
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"docs/**/*.*" = ["A001"]
|
|
|
|
[tool.ruff.lint.isort]
|
|
detect-same-package = false # to not consider instrumentation packages as first-party
|
|
known-first-party = ["opentelemetry"]
|
|
known-third-party = [
|
|
"psutil",
|
|
"pytest",
|
|
"redis",
|
|
"redis_opentracing",
|
|
"opencensus",
|
|
]
|
|
|
|
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#type-check-rule-overrides
|
|
[tool.pyright]
|
|
typeCheckingMode = "strict"
|
|
reportUnnecessaryTypeIgnoreComment = true
|
|
reportMissingTypeStubs = false
|
|
pythonVersion = "3.8"
|
|
reportPrivateUsage = false # Ignore private attributes added by instrumentation packages.
|
|
# Add progressively instrumentation packages here.
|
|
include = [
|
|
"instrumentation/opentelemetry-instrumentation-threading/**/*.py",
|
|
"instrumentation-genai/opentelemetry-instrumentation-vertexai/**/*.py",
|
|
]
|
|
# We should also add type hints to the test suite - It helps on finding bugs.
|
|
# We are excluding for now because it's easier, and more important to add to the instrumentation packages.
|
|
exclude = [
|
|
"instrumentation/opentelemetry-instrumentation-threading/tests/**",
|
|
"instrumentation-genai/opentelemetry-instrumentation-vertexai/tests/**/*.py",
|
|
"instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/**/*.py",
|
|
]
|