Remove ruff-increased-checking.toml as all checker are now on!

This commit is contained in:
Julian Stirling 2025-09-18 15:59:14 +01:00
parent 6b1e40f689
commit 3227c0cddf
4 changed files with 1 additions and 58 deletions

View file

@ -88,18 +88,6 @@ ruff-checks:
- ruff format --check - ruff format --check
# Only run on changed python files # Only run on changed python files
# Increased checking of the code with ruff this is allowed to fail
# while we improve the code quality. Rules from this are
# slowly moved into the main check
# Only runs when a .py file is edited
ruff-lint-increased:
stage: analysis
extends: .python
allow_failure: true
script:
- ruff --config ruff-increased-checking.toml check
# Python type checking with Mypy # Python type checking with Mypy
# Only runs when a .py file is edited # Only runs when a .py file is edited
mypy: mypy:

View file

@ -41,7 +41,7 @@ Ideally, python code should be:
The server code is going through significant flux during the transition from v2 to v3, so currently our test coverage is being rebuilt and type checking does not yet pass. The server code is going through significant flux during the transition from v2 to v3, so currently our test coverage is being rebuilt and type checking does not yet pass.
[Ruff](https://docs.astral.sh/ruff/) is used both for linting and formatting the codebase. Our custom linter rules are in our `pyproject.toml`. As we improve the codebase, more rules are being added to the linter; see `ruff-increased-checking.toml` for checks that we plan to get passing. [Ruff](https://docs.astral.sh/ruff/) is used both for linting and formatting the codebase. Our custom linter rules are in our `pyproject.toml`.
Run `ruff format` to format the code in a way that will pass on our CI. Run `ruff format` to format the code in a way that will pass on our CI.

View file

@ -100,10 +100,6 @@ testpaths = ["tests"]
line-ending = "native" line-ending = "native"
[tool.ruff.lint] [tool.ruff.lint]
# Slowly add linting rules from ruff-increased-checking.toml commented
# out rules can be checked by running
# ruff --config ruff-increased-checking.toml check
select = [ select = [
"E", # pycodestyle errors "E", # pycodestyle errors
"W", #pycodestyle warnings "W", #pycodestyle warnings

View file

@ -1,41 +0,0 @@
# This can be passed into ruff with nano ruff-increased-checking.toml
#
# Once the codebase is cleaner this can be added to pyproject.toml
# under the [tool.ruff.lint] heading
#
# Select more than the bare minimum checking in ruff
# This is only a subset of possible rules
# See: https://docs.astral.sh/ruff/rules
#
# It will take a long time to get this all passing. We should
# slowly move rules into the pyproject.toml as we improve the
# codebase
select = [
"E", # pycodestyle errors
"W", #pycodestyle warnings
"F", # PyFlakes
"PL", # Pylint (a subset of, catches far less than pylint does)
"B", # Flake8 bugbear
"A", # Flake8 builtins checker
"C", # Flake8 comprehensions
"FIX", #TODO/FIXME's in code. These should be added during development for ongoing tasks.
# If they are not fixed before merge they should be converted to GitLab issues
"LOG", # Flake8 logging issues (pedantic logger formatting issues can be added with "G")
"T20", # Warns for print statements, production code should log
"PT", # pytest linting
"RET", # Consistent clear return statements
"RSE", # Raise parentheses
"SIM", # Simplifications detected
"ARG", # unused arguments
"C90", # McCabe complexity!
"NPY", # Numpy linting
"N", # PEP8 naming
"D", # Docstring checks these may need to be added gradually
"ERA001", # Commented out code!
]
# Line length is set to 88 for ruff. This is what the formatter aims for
# some lines are not formatted to 88 if the formatter can't easily break
# them. Allow up to 99 before throwing a long line error
line-length = 99