Skip to content

Commit

Permalink
feat: improve format command
Browse files Browse the repository at this point in the history
  • Loading branch information
dshemetov committed Oct 25, 2023
1 parent f5d5496 commit 1d5b4fe
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
uses: akaihola/darker/.github/actions/[email protected]
- name: Format (darker)
run: |
DIFF="--diff" REVISION="--revision=${{ steps.commit-range.outputs.commit-range }}" make format
DIFF="--diff" CHECK="--check" REVISION="--revision=${{ steps.commit-range.outputs.commit-range }}" make format
3 changes: 2 additions & 1 deletion changehc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
REVISION ?= ""
DIFF ?= ""
CHECK ?= ""
venv:
python3.8 -m venv env

Expand All @@ -23,7 +24,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down
2 changes: 1 addition & 1 deletion claims_hosp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down
2 changes: 1 addition & 1 deletion doctor_visits/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down
2 changes: 1 addition & 1 deletion google_symptoms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;
Expand Down
2 changes: 1 addition & 1 deletion hhs_hosp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down
2 changes: 1 addition & 1 deletion nchs_mortality/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down
2 changes: 1 addition & 1 deletion nowcast/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir) --match-dir '(?!nowcast_fusion)'

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ target-version = ['py38']
revision = 'origin/main...'
color = true
isort = true
flynt = true
check = true

[tool.isort]
profile = "black"
Expand Down
2 changes: 1 addition & 1 deletion quidel_covidtest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down
2 changes: 1 addition & 1 deletion sir_complainsalot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lint:
. env/bin/activate; pydocstyle $(dir)

format:
. env/bin/activate; darker $(DIFF) $(REVISION) $(dir)
. env/bin/activate; darker $(DIFF) $(REVISION) $(CHECK) $(dir)

test:
. env/bin/activate ;\
Expand Down

0 comments on commit 1d5b4fe

Please sign in to comment.