A converter can either be a callable with a single argument or an instance of the Converter class, fix the type annotation to allow both cases everywhere _ConverterType is used
Also update field() and attr.ib() which are able to take a list or tuple of converters as an implicit pipe, add type annotations for that syntax
Pull Request Check List
[x] Do not open pull requests from your main branch – use a separate branch!
There's a ton of footguns waiting if you don't heed this warning. You can still go back to your project, create a branch from your main branch, push it, and open the pull request from the new branch.
This is not a pre-requisite for your pull request to be accepted, but you have been warned.
[x] Added tests for changed code.
Our CI fails if coverage is not 100%.
Summary
A converter can either be a callable with a single argument or an instance of the Converter class, fix the type annotation to allow both cases everywhere
_ConverterType
is usedAlso update
field()
andattr.ib()
which are able to take a list or tuple of converters as an implicit pipe, add type annotations for that syntaxPull Request Check List
main
branch – use a separate branch!.pyi
).tests/typing_example.py
.attr/__init__.pyi
, they've also been re-imported inattrs/__init__.pyi
..rst
and.md
files is written using semantic newlines.changelog.d
.