Back to all reviewers

Adapt for linter compatibility

open-telemetry/opentelemetry-python
Based on 2 comments
Other

When writing or modifying code, design patterns and templates to be compatible with linting tools. This is especially important for generated code and template systems.

Code Style Other

Reviewer Prompt

When writing or modifying code, design patterns and templates to be compatible with linting tools. This is especially important for generated code and template systems.

For templates that generate code, consider how linters will interpret the output:

# Before - may trigger lint warnings when a variable has an inline comment
# VARIABLE: Final = 42
"""
Deprecated: This is being phased out.
"""

# After - linter-friendly approach
# VARIABLE: Final = 42
# Deprecated: This is being phased out.

For generated code (like protobuf files), prioritize proper lint fixes rather than disabling linters. When lint issues are complex, consider addressing them in dedicated PRs to maintain code quality without blocking other changes. Ensure that tooling configurations (like those in tox.ini) properly handle linting requirements for all code types in your project.

2
Comments Analyzed
Other
Primary Language
Code Style
Category

Source Discussions