Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Jun 7, 2023
1 parent dceb9f3 commit 1987594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

- Use [PDM](https://pdm.fming.dev/latest/) instead of Poetry.
- _cattrs_ is now linted with [Ruff](https://beta.ruff.rs/docs/).
- Fix TypedDicts with periods in their field names. ([#376](https://github.com/python-attrs/cattrs/issues/376))
- Fix TypedDicts with periods in their field names.
([#376](https://github.com/python-attrs/cattrs/issues/376) [#377](https://github.com/python-attrs/cattrs/pull/377))

## 23.1.2 (2023-06-02)

Expand Down
4 changes: 2 additions & 2 deletions src/cattrs/gen/typeddicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def make_dict_structure_fn(
if override.omit:
continue
if not attr_required:
non_required.append(a)
non_required.append((ix, a))
continue

t = a.type
Expand Down Expand Up @@ -443,7 +443,7 @@ def make_dict_structure_fn(

# The second loop is for optional args.
if non_required:
for ix, a in enumerate(non_required, start=ix + 1):
for ix, a in non_required:
an = a.name
override = kwargs.get(an, neutral)
t = a.type
Expand Down

0 comments on commit 1987594

Please sign in to comment.