-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #452 from asfadmin/add-ruff
replace flake8 with ruff
- Loading branch information
Showing
6 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -4,21 +4,8 @@ on: push | |
|
||
jobs: | ||
|
||
flake8: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 flake8-import-order flake8-blind-except flake8-builtins | ||
- run: flake8 --max-line-length=120 --import-order-style=pycharm --statistics --application-import-names door | ||
call-ruff-workflow: | ||
uses: ASFHyP3/actions/.github/workflows/[email protected] | ||
|
||
cfn-lint: | ||
runs-on: ubuntu-latest | ||
|
This file contains 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 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 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,4 +1,5 @@ | ||
from door import app | ||
|
||
if __name__ == "__main__": | ||
|
||
if __name__ == '__main__': | ||
app.run(port=8080) |
This file contains 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 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,31 @@ | ||
[project] | ||
requires-python = "==3.12" | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
# The directories to consider when resolving first- vs. third-party imports. | ||
# See: https://docs.astral.sh/ruff/settings/#src | ||
src = ["**/src"] | ||
|
||
[tool.ruff.format] | ||
indent-style = "space" | ||
quote-style = "single" | ||
|
||
[tool.ruff.lint] | ||
extend-select = [ | ||
"I", # isort: https://docs.astral.sh/ruff/rules/#isort-i | ||
"UP", # pyupgrade: https://docs.astral.sh/ruff/rules/#pyupgrade-up | ||
|
||
# TODO: uncomment the following extensions and address their warnings: | ||
#"D", # pydocstyle: https://docs.astral.sh/ruff/rules/#pydocstyle-d | ||
#"ANN", # annotations: https://docs.astral.sh/ruff/rules/#flake8-annotations-ann | ||
|
||
"PTH", # use-pathlib-pth: https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth | ||
] | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "google" | ||
|
||
[tool.ruff.lint.isort] | ||
case-sensitive = true | ||
lines-after-imports = 2 |