Skip to content

Commit 4d49e48

Browse files
committed
fix: exclude generated code for linter
1 parent 7e7d4f4 commit 4d49e48

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

.github/workflows/sdk-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
python -m venv .venv
7575
. .venv/bin/activate
7676
python -m pip install --upgrade pip
77-
pip install poetry==1.8.5
77+
pip install poetry
7878
poetry config virtualenvs.create false
7979
(cd ./sdk-repo-updated && make install-dev)
8080
scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "[email protected]:stackitcloud/stackit-sdk-python.git" "python"

templates/python/pyproject.mustache

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pydantic = ">=2.9.2"
2727
python-dateutil = ">=2.9.0.post0"
2828

2929
[tool.poetry.group.dev.dependencies]
30-
black = "<25.0.0" # Upgrading to a newer version requires bigger changes in the python generator. The formatting style in black has changed.
30+
black = ">=24.8.0"
3131
pytest = ">=8.3.3"
3232
flake8 = [
3333
{ version= ">=5.0.3", python="<3.12"},
@@ -95,14 +95,5 @@ inline-quotes = '"'
9595
docstring-quotes = '"""'
9696
multiline-quotes = '"""'
9797
ban-relative-imports = true
98-
per-file-ignores = """
99-
# asserts are fine in tests, tests shouldn't be build optimized
100-
./tests/*: S101,
101-
# F841: some variables get generated but may not be used, depending on the api-spec
102-
# E501: long descriptions/string values might lead to lines that are too long
103-
./src/stackit/*/models/*: F841,E501
104-
# F841: some variables get generated but may not be used, depending on the api-spec
105-
# E501: long descriptions/string values might lead to lines that are too long
106-
# B028: stacklevel for deprecation warning is irrelevant
107-
./src/stackit/*/api/default_api.py: F841,B028,E501
108-
"""
98+
# Exclude generated code
99+
extend-exclude = [ "src/stackit/*/models/*", "src/stackit/*/api/*", "src/stackit/*/*.py" ]

0 commit comments

Comments
 (0)