Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't interpret arguments with a default of None as Optional #3248
I haven't looked in detail at your code yet, but when I tried this, the typeshed tests for Python 2.7 started failing without enabling the new flag. To repro, check out this PR, then
I don't want to post the entire list of errors (too long and boring) but here are the first few and last few:
May 26, 2017
I tried to use this and realized it only has an effect when
But the error that it produces is "Incompatible types in assignment (expression has type None, variable has type ...)".
I think it deserves a more specialized error, e.g. "Default for argument XXX is incompatible with its type (expression has type None, argument has type ...)".
If you agree, can you file a new issue to track that task?