Commit Graph

19 Commits

Author SHA1 Message Date
Andrey Vlasovskikh
92534805b5 Added missing special attributes for PY3 functions (#875) 2017-01-29 20:34:35 -08:00
Lukasz Langa
6eb97964fd Fixing flake8 E401, E402 errors 2016-12-20 00:47:51 -08:00
Lukasz Langa
6b5c6626d6 Fixing flake8 E121, E122, E123, E124, E125, E126 errors 2016-12-19 23:53:19 -08:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Danny Weinberg
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
TrueBrain
15ec66cdd6 Consider __doc__ always Optional. (#641)
python/mypy#2380 showed a discrepancy between object and FunctionType in stdlib2. The first defined __doc__ to be str, the second Optional[str]. As FunctionType depends on object, this is no longer valid.

As suggested by @gvanrossum in python/mypy#2380, all __doc__ should be considered Optional.

(Final verdict was just to remove most __doc__ attributes since it's inherited from object.)
2016-10-30 11:48:23 -07:00
Guido van Rossum
8515cf5de8 Attempt to reduce cyclical dependencies between types and importlib. (#335)
- Move Loader and ModuleType into _importlib_modulespec.pyi.
- Add "import X as X" for these to types.pyi and importlib/abc.pyi.

The goal is to ensure mypy -i still works, to fix https://github.com/python/mypy/issues/1797.
2016-07-05 10:23:24 -07:00
Guido van Rossum
37e42bfa96 ModuleType has a __file__ attribute. 2016-07-02 10:05:02 -07:00
Brett Cannon
43c3406770 Add stubs for importlib.machinery (#323)
* Fix some misspelled method names that were also missing 'self'

* Initial stubs for importlib.machinery

* Use importlib.machinery.ModuleSpec everywhere
2016-06-30 17:07:49 -07:00
Brett Cannon
05e02c188f Implement stubs for importlib.abc and update types.ModuleType (#321) 2016-06-30 15:02:42 -07:00
Tomasz Elendt
a277980d99 Fix types.MappingProxyType (#259) (#260) 2016-06-04 13:02:07 -07:00
Daniel Shaulov
14ffe7ea17 Inherit from Any in threading.local and SimpleNamespace 2016-01-22 12:24:36 +02:00
Matthias Kramm
94c9ce8fd0 Consistently use '= ...' for optional parameters. 2015-11-09 13:55:02 -08:00
Ben Longbons
c0aea8e8aa Finish implementation of the types module
Note that many classes will need special handling in the typing module.
2015-10-27 20:17:35 -07:00
Ben Longbons
56fe787c74 Update a bunch of stubs 2015-10-19 20:02:10 -07:00
Matthias Kramm
c1e554af68 fix syntax of types.pyi 2015-10-12 14:30:17 -07:00
Matthias Kramm
75b3d91e02 fixes for types.CodeType (in 2.7/ and 3/) 2015-10-12 10:44:45 -07:00
Ben Longbons
793f3399a7 Stub for inspect.stack() and related classes 2015-10-12 10:35:04 -07:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00