Skip to content

Commit

Permalink
switch to ruff from flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Dec 16, 2024
1 parent ea769ef commit 061f35f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@ name: Static code analysis
on: push

jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: |
python -m pip install --upgrade pip
make install
- run: make flake8
call-ruff-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]

cfn-lint:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ cost_profile ?= DEFAULT
render:
@echo rendering $(files) for API $(api_name) and security environment $(security_environment); python apps/render_cf.py -j $(files) -e $(compute_env_file) -s $(security_environment) -n $(api_name) -c $(cost_profile)

static: flake8 openapi-validate cfn-lint
static: ruff openapi-validate cfn-lint

flake8:
flake8 --ignore=E731 --max-line-length=120 --import-order-style=pycharm --statistics --application-import-names hyp3_api,get_files,handle_batch_event,set_batch_overrides,check_processing_time,start_execution_manager,start_execution_worker,disable_private_dns,update_db,upload_log,dynamo,lambda_logging,scale_cluster apps tests lib
ruff:
ruff check

openapi-validate: render
openapi-spec-validator apps/api/src/hyp3_api/api-spec/openapi-spec.yml
Expand Down
5 changes: 1 addition & 4 deletions requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ moto[dynamodb]==5.0.22
pytest==8.3.4
PyYAML==6.0.2
responses==0.25.3
flake8==7.1.1
flake8-import-order==0.18.2
flake8-blind-except==0.2.1
flake8-builtins==2.5.0
ruff==0.8.3
setuptools==75.6.0
openapi-spec-validator==0.7.1
cfn-lint==1.21.0
4 changes: 4 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line-length = 120

[format]
quote-style = "single"

0 comments on commit 061f35f

Please sign in to comment.