Skip to content

Commit b6d3d14

Browse files
authored
Merge pull request #69 from cdce8p/dev
Release v0.3.4
2 parents 15529b2 + 0f9a098 commit b6d3d14

14 files changed

Lines changed: 68 additions & 57 deletions

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ updates:
33
- package-ecosystem: "pip"
44
directory: "/"
55
schedule:
6-
interval: "daily"
6+
interval: "weekly"
77
labels:
88
- "dependency"
99
assignees:
1010
- "cdce8p"
1111
open-pull-requests-limit: 10
12+
rebase-strategy: "disabled"
1213

1314
- package-ecosystem: "github-actions"
1415
directory: "/"
@@ -19,3 +20,4 @@ updates:
1920
assignees:
2021
- "cdce8p"
2122
open-pull-requests-limit: 10
23+
rebase-strategy: "disabled"

.github/workflows/ci.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/[email protected]
2727
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
2828
id: python
29-
uses: actions/[email protected].1
29+
uses: actions/[email protected].2
3030
with:
3131
python-version: ${{ env.DEFAULT_PYTHON }}
3232
- name: Generate partial Python venv restore key
@@ -37,7 +37,7 @@ jobs:
3737
'requirements_test_pre_commit.txt') }}"
3838
- name: Restore Python virtual environment
3939
id: cache-venv
40-
uses: actions/[email protected].4
40+
uses: actions/[email protected].6
4141
with:
4242
path: venv
4343
key: >-
@@ -60,7 +60,7 @@ jobs:
6060
hashFiles('.pre-commit-config.yaml') }}"
6161
- name: Restore pre-commit environment
6262
id: cache-precommit
63-
uses: actions/[email protected].4
63+
uses: actions/[email protected].6
6464
with:
6565
path: ${{ env.PRE_COMMIT_CACHE }}
6666
key: >-
@@ -82,12 +82,12 @@ jobs:
8282
uses: actions/[email protected]
8383
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
8484
id: python
85-
uses: actions/[email protected].1
85+
uses: actions/[email protected].2
8686
with:
8787
python-version: ${{ env.DEFAULT_PYTHON }}
8888
- name: Restore Python virtual environment
8989
id: cache-venv
90-
uses: actions/[email protected].4
90+
uses: actions/[email protected].6
9191
with:
9292
path: venv
9393
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
@@ -99,7 +99,7 @@ jobs:
9999
exit 1
100100
- name: Restore pre-commit environment
101101
id: cache-precommit
102-
uses: actions/[email protected].4
102+
uses: actions/[email protected].6
103103
with:
104104
path: ${{ env.PRE_COMMIT_CACHE }}
105105
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }}
@@ -123,12 +123,12 @@ jobs:
123123
uses: actions/[email protected]
124124
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
125125
id: python
126-
uses: actions/[email protected].1
126+
uses: actions/[email protected].2
127127
with:
128128
python-version: ${{ env.DEFAULT_PYTHON }}
129129
- name: Restore Python virtual environment
130130
id: cache-venv
131-
uses: actions/[email protected].4
131+
uses: actions/[email protected].6
132132
with:
133133
path: venv
134134
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
@@ -153,12 +153,12 @@ jobs:
153153
uses: actions/[email protected]
154154
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
155155
id: python
156-
uses: actions/[email protected].1
156+
uses: actions/[email protected].2
157157
with:
158158
python-version: ${{ env.DEFAULT_PYTHON }}
159159
- name: Restore Python virtual environment
160160
id: cache-venv
161-
uses: actions/[email protected].4
161+
uses: actions/[email protected].6
162162
with:
163163
path: venv
164164
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
@@ -187,7 +187,7 @@ jobs:
187187
uses: actions/[email protected]
188188
- name: Set up Python ${{ matrix.python-version }}
189189
id: python
190-
uses: actions/[email protected].1
190+
uses: actions/[email protected].2
191191
with:
192192
python-version: ${{ matrix.python-version }}
193193
- name: Generate partial Python venv restore key
@@ -198,7 +198,7 @@ jobs:
198198
'requirements_test_pre_commit.txt') }}"
199199
- name: Restore Python virtual environment
200200
id: cache-venv
201-
uses: actions/[email protected].4
201+
uses: actions/[email protected].6
202202
with:
203203
path: venv
204204
key: >-
@@ -228,12 +228,12 @@ jobs:
228228
uses: actions/[email protected]
229229
- name: Set up Python ${{ matrix.python-version }}
230230
id: python
231-
uses: actions/[email protected].1
231+
uses: actions/[email protected].2
232232
with:
233233
python-version: ${{ matrix.python-version }}
234234
- name: Restore Python virtual environment
235235
id: cache-venv
236-
uses: actions/[email protected].4
236+
uses: actions/[email protected].6
237237
with:
238238
path: venv
239239
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
uses: actions/[email protected]
1818
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
1919
id: python
20-
uses: actions/[email protected].1
20+
uses: actions/[email protected].2
2121
with:
2222
python-version: ${{ env.DEFAULT_PYTHON }}
2323
- name: Install requirements
2424
run: |
2525
python -m pip install -U pip twine wheel
26-
python -m pip install -U "setuptools>=56.0.0"
26+
python -m pip install -U "setuptools>=57.1.0"
2727
- name: Build distributions
2828
run: |
2929
python setup.py sdist bdist_wheel

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.12.0
3+
rev: v2.21.2
44
hooks:
55
- id: pyupgrade
66
args: [--py38-plus]
77
exclude: &fixtures ^tests/fixtures/.+\.py$
88
- repo: https://gitlab.com/pycqa/flake8
9-
rev: 3.9.0
9+
rev: 3.9.2
1010
hooks:
1111
- id: flake8
1212
files: ^(python_typing_update|script|tests)/.+\.py$
1313
exclude: *fixtures
1414
- repo: https://github.com/PyCQA/isort
15-
rev: 5.8.0
15+
rev: 5.9.2
1616
hooks:
1717
- id: isort
1818
exclude: *fixtures

.vscode/settings.default.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"python.linting.flake8Enabled": true,
88
"python.linting.pylintEnabled": true,
99
"python.linting.mypyEnabled": true,
10-
"python.testing.pytestArgs": [],
10+
"python.testing.pytestArgs": [
11+
"--disable-warnings"
12+
],
1113
"python.testing.unittestEnabled": false,
1214
"python.testing.nosetestsEnabled": false,
1315
"python.testing.pytestEnabled": true,

pylintrc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[MASTER]
22
ignore=
3+
load-plugins =
4+
pylint.extensions.typing,
35

46
[BASIC]
5-
good-names=
7+
good-names =
68
i,j,k,_,fp,it,ex,logger
79

810
[MESSAGE CONTROL]
911
# Reasons disabled:
1012
# superfluous-parens - used with :=
1113
# duplicate-code - for scripts acceptable
12-
disable=
14+
disable =
1315
superfluous-parens,
14-
missing-module-docstring,
15-
missing-class-docstring,
16-
missing-function-docstring,
16+
missing-docstring,
1717
too-many-instance-attributes,
1818
too-many-return-statements,
1919
too-many-locals,
@@ -25,7 +25,11 @@ disable=
2525
duplicate-code,
2626

2727
[FORMAT]
28-
max-line-length=119
28+
max-line-length = 119
2929

3030
[REPORTS]
3131
score = no
32+
33+
[TYPING]
34+
py-version = 3.8
35+
runtime-typing = no

python_typing_update/const.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from enum import Flag, auto
77
from typing import NamedTuple
88

9-
version = (0, 3, 3)
10-
dev_version = None # Set to `None` for release
9+
version = (0, 3, 4)
10+
dev_version = 0 # Set to `None` for release
1111

1212
version_str = '.'.join(map(str, version))
1313
if dev_version is not None:

python_typing_update/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async def async_load_file(filename: str) -> tuple[str, FileAttributes]:
136136
active_tasks -= 1
137137
return filename, FileAttributes(file_status, imports_set)
138138

139-
results = await asyncio.gather(*[async_load_file(file_) for file_ in filenames])
139+
results = await asyncio.gather(*(async_load_file(file_) for file_ in filenames))
140140
return dict(results)
141141

142142

@@ -177,7 +177,7 @@ async def async_run(args: argparse.Namespace) -> int:
177177
builtins.print = lambda *args, **kwargs: None
178178

179179
return_values = await asyncio.gather(
180-
*[typing_update(loop, filename, args, attrs.status) for filename, attrs in filenames.items()])
180+
*(typing_update(loop, filename, args, attrs.status) for filename, attrs in filenames.items()))
181181
for status, filename in return_values:
182182
if status == 0:
183183
files_updated.append(filename)
@@ -204,10 +204,10 @@ async def async_run(args: argparse.Namespace) -> int:
204204
return 0
205205

206206
files_updated_set: set[str] = set(files_updated)
207-
files_with_comments = sorted([
207+
files_with_comments = sorted(
208208
filename for filename, attrs in filenames.items()
209209
if FileStatus.COMMENT in attrs.status and filename in files_updated_set
210-
])
210+
)
211211
files_imports_changed: list[str] = []
212212
for file_, attrs in (await async_load_files(args, files_updated_set, check_comments=False)).items():
213213
import_diff = filenames[file_].imports.difference(attrs.imports)

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
aiofiles==0.6.0
1+
aiofiles==0.7.0
22
autoflake==1.4
3-
isort==5.8.0
4-
pyupgrade==2.12.0
5-
reorder-python-imports==2.4.0
3+
isort==5.9.2
4+
pyupgrade==2.21.2
5+
reorder-python-imports==2.5.0

requirements_black.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
black==20.8b1
1+
black==21.7b0

0 commit comments

Comments
 (0)