Merged
Conversation
RUF013: 'PEP 484 prohibits implicit `Optional'
RUF059: 'Unpacked variable is never used'
RUF005: 'Consider iterable unpacking instead of concatenation'
RUF003: 'Comment contains ambiguous `’` (RIGHT SINGLE QUOTATION MARK)'
RUF019: 'Unnecessary key check before dictionary access'
RUF015: 'Prefer `next(iter(...))` over single element slice'
RUF001: 'String contains ambiguous `ı` (LATIN SMALL LETTER DOTLESS I)'
RUF043: 'Pattern passed to `match=` contains metacharacters but is neither escaped nor raw'
RUF100: 'Unused `noqa` directive (non-enabled: `E501`)'
RUF012: 'Mutable class attributes should be annotated with `typing.ClassVar`'
RSE102: 'Unnecessary parentheses on raised exception'
PT022: 'No teardown in fixture, use `return` instead of `yield`'
PT001: 'Use `@pytest.fixture` over `@pytest.fixture()`'
PT012: '`pytest.raises()` block should contain a single simple statement'
PT018: 'Assertion should be broken down into multiple parts'
PT014: 'Duplicate of test case in `pytest.mark.parametrize`'
PT007: 'Wrong values type in `pytest.mark.parametrize` expected `list` of `tuple`'
PT006: 'Wrong type passed to first argument of `pytest.mark.parametrize`; expected `tuple`'
PT011: '`pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception'
553cd66 to
e9479a6
Compare
freakboy3742
previously requested changes
Oct 20, 2025
Member
freakboy3742
left a comment
There was a problem hiding this comment.
This looks good; however, I'd argue against adding the RSE ruleset. I understand the braces are redundant, but I think the bracket less syntax is confusing unless you fully understand the underlying behavior, as it means the raise doesn't explicitly read as an empty instantiation.
As a general rule, multiple smaller PRs are preferable to one big one; but in this case, just dropping the RSE rule (and related changes) is fine (unless undoing the RSE changes is easier to do in new PRs).
rmartin16
reviewed
Oct 20, 2025
Contributor
Author
Done. |
mhsmith
approved these changes
Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable the RUF and PT ruff rule sets and handle all findings.
These changes were not requested. If you don't want them, please just reject the PR. If you want only a subset, or all changes spread over multiple PRs, please let me know.
Here are all code changes:
RUF - ruff-specific rules
dictasMapping)x: str = Nonewithx: str | None = Nonelist(...)[0]withiter(next(...)).in Regex patternsnoqadirectivesPT - flake8-pytest-style
pytest.fixturecallspytest.mark.parametrizeparameter listpytest.mark.parametrizecasespytest.raises()pytest.raises()blockspytest.mark.parametrizeassert ... and ...statementsyieldin pytest fixture without teardown withreturnPR Checklist: