File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 4444
4545 - name : Update ASF APIs
4646 run : |
47- source .venv/bin/activate
48- python3 -m localstack.aws.scaffold upgrade
49-
50- - name : Format code
51- run : |
52- source .venv/bin/activate
53- # explicitly perform an unsafe fix to remove unused imports in the generated ASF APIs
54- ruff check --select F401 --unsafe-fixes --fix localstack-core/localstack/aws/api/ --config "lint.preview = true"
55- make format-modified
47+ make asf-regenerate
5648
5749 - name : Check for changes
5850 id : check-for-changes
Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ format-modified: ## Run ruff to format only modified code
140140 python -m ruff check --output-format=full --fix ` git diff --diff-filter=d --name-only HEAD | grep ' \.py$$' | xargs` ; \
141141 python -m ruff format ` git diff --diff-filter=d --name-only HEAD | grep ' \.py$$' | xargs` )
142142
143+ asf-regenerate : # # Regenerate ASF APIs
144+ $(VENV_RUN ) ; python -m localstack.aws.scaffold upgrade
145+ @echo ' Removing unused imports from generated modules'
146+ $(VENV_RUN ) ; python -m ruff check --select F401 --unsafe-fixes --fix localstack-core/localstack/aws/api/ --config " lint.preview = true"
147+ $(VENV_RUN ) ; python -m ruff format localstack-core/localstack/aws/api/
148+
143149init-precommit : # # install te pre-commit hook into your local git repository
144150 ($( VENV_RUN) ; pre-commit install)
145151
@@ -158,4 +164,4 @@ clean-dist: ## Clean up python distribution directories
158164 rm -rf dist/ build/
159165 rm -rf localstack-core/* .egg-info
160166
161- .PHONY : usage freeze install-basic install-runtime install-test install-dev install entrypoints dist publish coveralls start docker-run-tests docker-cp-coverage test test-coverage lint lint-modified format format-modified init-precommit clean clean-dist upgrade-pinned-dependencies
167+ .PHONY : usage freeze install-basic install-runtime install-test install-dev install entrypoints dist publish coveralls start docker-run-tests docker-cp-coverage test test-coverage lint lint-modified format format-modified asf-regenerate init-precommit clean clean-dist upgrade-pinned-dependencies
You can’t perform that action at this time.
0 commit comments