Closed GernotMaier closed 1 month ago
I mark this ready for review - codecov complaints about missing tests, but this PR is not about test coverage and I suggest to ignore these.
Having a broad test is still better than having no test. I think it is strange to remove tests only to have ruff not complaining about them.
As discussed in person, PT011 and PT012 is something we need to discuss if we want to integrate them. We are not obliged to use all options proposed by ruff. I am opening an issue on it.
Note also that these two are very independent of the rest of the code.
As @GernotMaier prefer to ignore the failing coverage test and deal with it later, I am merging this.
Needs to be reviewed after merging #938
This is step 2 of the ruff integration which fixes all warnings with the following exceptions:
pytest.raises(ValueError)
is too broad (I think we should fix those)pytest.raises()
block should contain a single simple statement (Not sure if this is absolutely necessary; but easy to fix)This is with "D" (documentation checks) switched off. Ruff suggest a lot (thousands) of changes to the docstrings and we need to discuss how we do this (also in light of #886). I think we first want to understand how we want our docstrings to look like (I don't like all ruff suggestions.)