Skip to content

Commit 76ef048

Browse files
tomaszwrzonskicnfait
authored andcommitted
replace black formatter with ruff format
1 parent 1e5c9a3 commit 76ef048

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed

.github/workflows/static-checking.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ jobs:
5151
- name: install requirements
5252
run: |
5353
python -m pip install --upgrade pip
54-
python -m pip install black ruff
55-
- name: black
56-
run: black --check .
54+
python -m pip install ruff
55+
- name: ruff format
56+
run: ruff format --check .
5757
- name: ruff
58-
run: ruff check .
58+
run: ruff check --output-format github .
5959
shellcheck:
6060
runs-on: ubuntu-latest
6161
steps:

pyproject.toml

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
[tool.black]
2-
target-version = ["py312"]
3-
line-length = 120
4-
extend-exclude = '''
5-
(
6-
^/sdlf-cicd/sam-translate.py
7-
)
8-
'''
9-
101
[tool.ruff]
112
extend-select = ["I", "PL", "W"]
123
ignore = ["PLR0912", "PLR0913", "PLR0915"]
13-
fixable = ["I001"]
4+
fixable = ["I001", "W291"]
145
extend-exclude = ["sdlf-cicd/sam-translate.py"]
156
line-length = 120
167
target-version = "py312"

sdlf-cicd/lambda/team-cicd/src/lambda_function.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,7 @@ def lambda_handler(event, context):
438438
commitId=codecommit.get_branch(
439439
repositoryName=repository_name,
440440
branchName="main",
441-
)[
442-
"branch"
443-
]["commitId"],
441+
)["branch"]["commitId"],
444442
)
445443
logger.info(
446444
"Branch %s created in repository %s",

validate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -ex
33

44
# python
5-
black --check .
5+
ruff format --check .
66
ruff check .
77
# pylint $(git ls-files --exclude-standard '*.py') # pylint is disabled for now
88
trivy fs --scanners vuln .

0 commit comments

Comments
 (0)