-
Notifications
You must be signed in to change notification settings - Fork 1
[MISC] Increase coverage #9
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ lint = [ | |
] | ||
unit = [ | ||
"coverage[toml]==7.9.1; python_version > '3.8'", | ||
"pytest>=8.3.5; python_version < '3.9'", | ||
"pytest==8.4.1; python_version >= '3.9'" | ||
] | ||
|
||
|
@@ -41,9 +40,6 @@ branch = true | |
|
||
[tool.coverage.report] | ||
show_missing = true | ||
exclude_lines = [ | ||
"logger\\.debug" | ||
] | ||
Comment on lines
-44
to
-46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to exclude as we bump coverage. |
||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Linting for the tests only. We have to keep 3.8 compatibility for PGB VM charm, but there's no need to also keep 3.8 support for the tests. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright 2025 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
# Linting tools configuration | ||
[tool.ruff] | ||
# preview and explicit preview are enabled for CPY001 | ||
preview = true | ||
target-version = "py312" | ||
src = ["src", "."] | ||
line-length = 99 | ||
|
||
[tool.ruff.lint] | ||
explicit-preview-rules = true | ||
select = ["A", "E", "W", "F", "C", "N", "D", "I001", "B", "CPY001", "RUF", "S", "SIM", "UP", "TCH"] | ||
extend-ignore = [ | ||
"D203", | ||
"D204", | ||
"D213", | ||
"D215", | ||
"D400", | ||
"D404", | ||
"D406", | ||
"D407", | ||
"D408", | ||
"D409", | ||
"D413", | ||
] | ||
# Ignore E501 because using black creates errors with this | ||
# Ignore D107 Missing docstring in __init__ | ||
ignore = ["E501", "D107"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"*" = [ | ||
"D100", "D101", "D102", "D103", "D104", | ||
# Asserts | ||
"B011", | ||
# Disable security checks for tests | ||
"S", | ||
] | ||
|
||
[tool.ruff.lint.flake8-copyright] | ||
# Check for properly formatted copyright header in each file | ||
author = "Canonical Ltd." | ||
notice-rgx = "Copyright\\s\\d{4}([-,]\\d{4})*\\s+" | ||
min-file-size = 1 | ||
|
||
[tool.ruff.lint.mccabe] | ||
max-complexity = 10 | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "google" |
Uh oh!
There was an error while loading. Please reload this page.