Skip to content

Commit 47628ec

Browse files
authored
Stop generating kwonly params for speed (#388)
* Stop generating kwonly params for speed * Changelog
1 parent 8b2a7c0 commit 47628ec

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
path: "htmlcov"
7878

7979
- name: "Make badge"
80+
if: github.ref == 'refs/heads/main'
8081
uses: "schneegans/[email protected]"
8182
with:
8283
# GIST_TOKEN is a GitHub personal access token with scope "gist".

HISTORY.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@
1212
- Improve the implementation of `cattrs._compat.is_typeddict`. The implementation is now simpler, and relies on fewer private implementation details from `typing` and typing_extensions.
1313
([#384](https://github.com/python-attrs/cattrs/pull/384))
1414
- Improve handling of TypedDicts with forward references.
15+
- Speed up generated _attrs_ and TypedDict structuring functions by changing their signature slightly.
16+
([#388](https://github.com/python-attrs/cattrs/pull/388))
1517

1618
## 23.1.2 (2023-06-02)
1719

1820
- Improve `typing_extensions` version bound. ([#372](https://github.com/python-attrs/cattrs/issues/372))
1921

2022
## 23.1.1 (2023-05-30)
2123

22-
- Add `typing_extensions` as a direct dependency on 3.10. ([#369](https://github.com/python-attrs/cattrs/issues/369) [#370](https://github.com/python-attrs/cattrs/pull/370))
24+
- Add `typing_extensions` as a direct dependency on 3.10.
25+
([#369](https://github.com/python-attrs/cattrs/issues/369) [#370](https://github.com/python-attrs/cattrs/pull/370))
2326

2427
## 23.1.0 (2023-05-30)
2528

src/cattrs/gen/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def make_dict_structure_fn(
470470
globs[k] = v
471471

472472
total_lines = [
473-
f"def {fn_name}(o, _, *, {internal_arg_line}):",
473+
f"def {fn_name}(o, _, {internal_arg_line}):",
474474
*lines,
475475
*post_lines,
476476
*instantiation_lines,

src/cattrs/gen/typeddicts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def make_dict_structure_fn(
504504
globs[k] = v
505505

506506
total_lines = [
507-
f"def {fn_name}(o, _, *, {internal_arg_line}):",
507+
f"def {fn_name}(o, _, {internal_arg_line}):",
508508
*lines,
509509
*post_lines,
510510
" return res",

0 commit comments

Comments
 (0)