-
Notifications
You must be signed in to change notification settings - Fork 36
[FSSDK-12276] update: replace flake8 with ruff #492
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
Merged
FarhanAnjum-opti
merged 9 commits into
master
from
farhan/FSSDK-12276-replace-flake8-with-ruff
Feb 10, 2026
+49
−24
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
32a8dc0
Add Ruff configuration file
FarhanAnjum-opti 13435e5
Update target version in Ruff configuration to Python 3.9
FarhanAnjum-opti 17a1925
Replace Flake8 with Ruff for linting in CI and update contribution gu…
FarhanAnjum-opti 84dfe2e
Remove Flake8 configuration file as part of replacing Flake8 with Ruff
FarhanAnjum-opti 82c6acf
ruff autofix
FarhanAnjum-opti 1ddd98d
testing ruff fail in ci
FarhanAnjum-opti a7115f4
Fix formatting in ruff.toml by ensuring newline at end of file
FarhanAnjum-opti 5c96d02
Update .github/workflows/python.yml
FarhanAnjum-opti 3823723
ruff fix
FarhanAnjum-opti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| coverage | ||
| flake8 >= 4.0.1 | ||
| ruff >= 0.15.0 | ||
| funcsigs >= 0.4 | ||
| pytest >= 6.2.0 | ||
| pytest-cov | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Ruff configuration | ||
| # https://docs.astral.sh/ruff/configuration/ | ||
|
|
||
| line-length = 120 | ||
| target-version = "py39" | ||
|
|
||
| exclude = [ | ||
| ".git", | ||
| ".venv", | ||
| "__pycache__", | ||
| "build", | ||
| "dist", | ||
| "*.egg-info", | ||
| "*virtualenv*", | ||
| "optimizely/lib/pymmh3.py", | ||
| "tests/testapp/application.py", | ||
| ] | ||
|
|
||
| [lint] | ||
| # Flake8-equivalent rules: | ||
| # E, W = pycodestyle (style errors & warnings) | ||
| # F = Pyflakes (logic errors, undefined names, unused imports) | ||
| select = ["E", "W", "F"] | ||
|
|
||
| # Match current flake8 ignores | ||
| # E722 - do not use bare 'except' | ||
| ignore = ["E722"] | ||
FarhanAnjum-opti marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Allow autofix for all rules | ||
| fixable = ["ALL"] | ||
| unfixable = [] | ||
|
|
||
| [lint.per-file-ignores] | ||
| # Ignore unused imports in __init__ files | ||
| "__init__.py" = ["F401"] | ||
|
|
||
| [lint.isort] | ||
| known-first-party = ["optimizely"] | ||
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.
Uh oh!
There was an error while loading. Please reload this page.