Commit Graph
6 Commits
Author SHA1 Message Date
Danny WeinbergandJelle Zijlstra 9b479fd07e Have Python 2 IntEnum values be ints (#2104)
Currently the Python 2 stub for `IntEnum` just inherits from `Enum` without changing anything, meaning that its `value` has type `Any`. This changes it such that, if you know you have an `IntEnum` you get the more specific `int` type for the `value`. Note that this has already been done for Python 3 `IntEnum` (both in `third_party/3/enum.pyi` and `stdlib/3.4/enum.pyi`).
2018-05-08 19:39:45 -07:00
Danny WeinbergandJelle Zijlstra 12d60a2760 Allow passing None for gflags default string value (#2016) 2018-04-04 16:50:28 -07:00
Danny WeinbergandDavid Fisher 3855e7023f Ignore a stub class that extends Any (#745)
Ignore a stub class that extends Any so that programs can use `--disallow-subclassing-any`.
2016-12-05 14:30:14 -08:00
Danny WeinbergandGuido van Rossum 679a6e5669 Give shutil.which a return annotation (#744) 2016-12-05 11:41:53 -08:00
Danny WeinbergandGuido van Rossum 708fd960da Fix errors in stubs when running in strict mode (#515) 2016-09-02 19:04:56 -07:00
Danny WeinbergandDavid Fisher 68f8a278fe Improve correctness of pathlib stubs (#483)
I went through each method in the source and verified the inputs it accepts and outputs it gives. I also redefined a few methods on the `Path` class so that MyPy knows they return `Path` instead of `PurePath`. This is really just a temporary workaround until https://github.com/python/mypy/issues/1212 is fixed, but greatly improves the process of working with the `pathlib` module and is therefore likely worth the duplication.
2016-08-26 13:17:22 -07:00