Commit Graph

8 Commits

Author SHA1 Message Date
Guido van Rossum
30791d4208 Give Python 2 sys.getprofile() and sys.gettrace() return types (Any). (#1988)
(In Python 3 their types are already correct.)
2018-03-26 18:37:04 -07:00
rchen152
38dc8f5a6a Switch usages of mypy_extensions.NoReturn over to typing.NoReturn. (#1942)
* Change mypy_extensions.NoReturn to typing.NoReturn everywhere.
2018-03-05 12:42:29 -08:00
Matthias Kramm
9c04490e92 add sys.setdefaultencoding() (#1865) 2018-02-08 11:25:48 -08:00
Matthias Kramm
8d8708594e Make sys.modules a Dict[str, Any] (#1266)
* Add __getattr__ to ModuleType.

Modules can contain anything, so give them a generic "__getattr__(name) -> Any".
This makes code like the following type-check, in pytype:
    sys.modules.get("random").randint

* undo Python 3 change

* Revert "undo Python 3 change"

This reverts commit 96cf2d529e374a754f1ba681f0fc81aab25f81ef.

* Revert "Add __getattr__ to ModuleType."

This reverts commit 3ac1cf8a3b25dabfe386fbf34aef680fb1acd112.

* In stdlib/2/, make sys.modules a Dict[str, Any].

(Instead of Dict[str, ModuleType])
Same as stdlib/3/.
2017-05-20 11:08:25 -07:00
David Euresti
ac4cb7a619 Make sys.getfilesystemencoding not return None (#1245)
Fixes #1221
2017-05-05 07:45:10 -07:00
David Fisher
2cb8e184cc Add NoReturn (#811)
* Add NoReturn
2017-01-04 13:38:05 -08:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Guido van Rossum
cb97bb54c0 Move 2.7 to 2 (#635)
Closes #579.
2016-10-26 16:24:49 -07:00