Commit Graph

1 Commits

Author SHA1 Message Date
Vitaliy Yelnik 0bf0678a22
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 <hs@ox.cx>
2023-07-29 21:31:36 +02:00