Replace : Incomplete | None = None
with =None
?
#14029
Labels
project: policy
Organization of the typeshed project
From #14027
The form
Incomplete | None = None
is basically a holdover from before we included defaults in stubs, whereIncomplete | None = ...
provided extra information.In #14027 @Avasam wrote:
Unknown | None
instead ofAny | None
sounds like this would be worth it alone. I also like that this form would be more succinct, while being quite obvious.@Avasam also wrote:
This is something we need to look out for, but is - in my opinion - not a valid reason not to do this. Marking something as "strict" when it's using
Incomplete
is cheating anyway, and we don't allow bareIncomplete
statements.Whatever we decide, we should enforce the style using flake8-pyi.
If we change this, we should also ask mypy to change stubgen to follow this style.
The text was updated successfully, but these errors were encountered: