-
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TypeError for `asdict(<class with namedtuple>, retain_collection_…
…types=True)` (#1165) * Fix TypeError for asdict with namedtuples and retain_collection_types=True * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add news fragment in `changelog.d` * fix pre-commit interrogate checker * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix flake8 issue * also fixed `astuple` * Add `_is_namedtuple` function * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix SyntaxError for python 3.7 * use `issubclass(..., tuple)` * use issubclass(cf, tuple) if case of TypeError * pragma: no cover * Get rid of the `# no cover` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * simplify a bit * Update tests/test_funcs.py * Update tests/test_funcs.py * Update tests/test_funcs.py * Update tests/test_funcs.py * Update tests/test_funcs.py * Update tests/test_funcs.py * Update tests/test_funcs.py * Update tests/test_funcs.py * Update changelog.d/1165.change.md * Escape patterns --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hynek Schlawack <[email protected]>
- Loading branch information
1 parent
a37b556
commit 0bf0678
Showing
3 changed files
with
133 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed serialization of namedtuple fields using `attrs.asdict/astuple()` with `retain_collection_types=True`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters