Skip to content

Commit 580c209

Browse files
committed
improve stub generation
1 parent 048bd2f commit 580c209

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/stubs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ concurrency:
33
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
44
cancel-in-progress: true
55
on: # yamllint disable-line rule:truthy
6+
pull_request:
67
schedule:
78
- cron: '0 3 * * *'
89
workflow_dispatch:
@@ -31,6 +32,7 @@ jobs:
3132
- name: Generate stub files
3233
run: python tools/stubgen.py
3334
- name: Push stub files
35+
if: github.event_name == 'push'
3436
run: |
3537
git config --global user.name 'github-actions[bot]'
3638
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,10 @@ minversion = '6.0'
144144

145145
[tool.ruff]
146146
extend-exclude = [
147-
'*.pyi',
148147
'doc',
149148
'setup.py',
150149
]
151-
ignore = [
152-
"UP007", # 'Use `X | Y` for type annotations', requires python 3.10
153-
]
150+
ignore = []
154151
line-length = 88
155152
select = ["E", "F", "UP", "W"]
156153
target-version = 'py39'
@@ -159,6 +156,10 @@ target-version = 'py39'
159156
docstring-code-format = true
160157

161158
[tool.ruff.per-file-ignores]
159+
'*' = [
160+
"UP007", # 'Use `X | Y` for type annotations', requires python 3.10
161+
]
162+
'*.pyi' = ['E501']
162163
'__init__.py' = ['F401']
163164

164165
[tool.setuptools]

0 commit comments

Comments
 (0)