Shantanu
04fb7ceb3c
builtins: add a getattr overload for bool ( #5518 )
...
As brought up in https://github.com/python/typeshed/pull/5516
Alternatives include:
- Use another type var that has a value restriction
- Doing something fancy with Protocols that have a __bool__ that returns
a Literal (which may not work)
- Doing nothing
2021-05-29 07:09:38 -07:00
Neil Vyas
8d56328a24
change getattr stubs to better type the default argument and return type ( #5516 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-05-21 16:44:11 -07:00
Eric Traut
58e083fef9
Marked the bool class as @final because it cannot be subclassed. ( #5286 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-05-01 21:38:10 -07:00
Sebastian Rittau
4ac3ccad45
black: enable skip_magic_trailing_comma ( #5252 )
...
* black: enable skip_magic_trailing_comma
* Remove spurious commas
2021-04-27 08:32:32 -07:00
Sebastian Rittau
bac1918b5f
PathLike cleanup ( #5242 )
...
Copy builtins._PathLike to os.PathLike
Use os.PathLike exclusively outside of builtins
2021-04-23 10:15:07 -07:00
Ivan Levkivskyi
16ae4c6120
Re-organize directory structure ( #4971 )
...
See discussion in #2491
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2021-01-27 12:00:39 +00:00