Prompt
Ensure configuration files use tool-specific syntax and conventions while leveraging appropriate defaults. Be intentional about version constraints and conditionals in dependency specifications.
For tool configurations:
- Use tool-specific syntax and options (e.g., for Pyright type ignores, use
pyright: ignore [error_code]instead oftype: ignore [error_code]) - Leverage built-in defaults when appropriate (e.g., Ruff automatically respects
.gitignorefiles) - Be explicit about configuration modes (e.g., strict vs. standard type checking)
For dependency specifications:
- Apply appropriate version constraints based on the package’s versioning practices
- Use platform/version conditionals for dependencies only required in specific environments
- Be conservative with version ranges for packages that don’t follow semantic versioning
Example:
# Good: Using tool-specific configuration with appropriate defaults
[tool.ruff]
target-version = "py38"
line-length = 79
# Not duplicating default excludes that already cover .tox, .venv, etc.
# Good: Using specific type ignore syntax
# In Python file: # pyright: ignore [specificError]
# For whole file: # pyright: strict, reportUnusedVariable=none
# Good: Proper dependency versioning with conditionals
dependencies = [
"Deprecated >= 1.2.6",
"importlib-metadata >= 6.0, <= 8.2.0; python_version < '3.10'",
]