Skip to content

ruff rules RET for return statements - #15301

Merged
cclauss merged 2 commits into
TheAlgorithms:masterfrom
cclauss:more-ruff-rules
Sep 12, 2026
Merged

ruff rules RET for return statements#15301
cclauss merged 2 commits into
TheAlgorithms:masterfrom
cclauss:more-ruff-rules

Conversation

@cclauss

@cclauss cclauss commented Sep 12, 2026

Copy link
Copy Markdown
Member

https://docs.astral.sh/ruff/rules/#flake8-return-ret

% ruff check --select=RET --ignore=RET504,RET505 --statistics

39	RET506	[*] superfluous-else-raise
14	RET508	[*] superfluous-else-break
 6	RET507	[*] superfluous-else-continue
 1	RET502	[*] implicit-return-value
Found 60 errors.
[*] 60 fixable with the `--fix` option.

% ruff check --select=RET --ignore=RET504,RET505 --fix --silent

Found 85 errors (85 fixed, 0 remaining).

@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files tests are failing Do not merge until tests pass labels Sep 12, 2026
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Sep 12, 2026
@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed and removed tests are failing Do not merge until tests pass labels Sep 12, 2026
@cclauss
cclauss merged commit 7bd1e98 into TheAlgorithms:master Sep 12, 2026
8 checks passed
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Sep 12, 2026
@cclauss
cclauss deleted the more-ruff-rules branch September 12, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants