Files
opentelemetry-python-contrib/.pre-commit-config.yaml
Luke (GuangHui) Zhang 4f89e758b1 fix: suppress ruff PLC0415 for conditional gevent import (#3842)
The generate_instrumentation_bootstrap.py script was failing with a
ruff linting error (PLC0415: import should be at top-level) when
checking the auto_instrumentation module.

Add noqa comment to suppress this error for the gevent monkey patch
import, which is intentionally inside a try-except block for
conditional loading. This allows the bootstrap generation script
to complete successfully.
2025-11-13 12:23:10 +01:00

22 lines
603 B
YAML

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.1
hooks:
# Run the linter.
- id: ruff
args: ["--fix", "--show-fixes"]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.6.0
hooks:
- id: uv-lock
- repo: https://github.com/rstcheck/rstcheck
rev: 77490ffa33bfc0928975ae3cf904219903db755d # frozen: v6.2.5
hooks:
- id: rstcheck
additional_dependencies: ['rstcheck[sphinx]']
args: ["--report-level", "warning"]