Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruff-base.toml to discourage using assert in code except for tests #1426

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion templates/ruff-base.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ lint.extend-select = [
"ARG001", # Unused function argument
"RSE102", # Unnecessary parentheses on raised exception
"PERF401", # Use a list comprehension to create a transformed list
"S101", # Use of `assert` detected
]

lint.ignore = [
Expand All @@ -56,4 +57,4 @@ max-line-length = 100 # E501 reports lines that exceed the length of 100.
# - D205: Don't worry about test docstrings
# - ARG001: Unused function argument false positives for some fixtures
# - E501: Line-too-long
"**/tests/test_*.py" = ["D205", "ARG001", "E501"]
"**/tests/test_*.py" = ["D205", "ARG001", "E501", "S101"]