Commit Graph

39 Commits

Author SHA1 Message Date
David Euresti
ce3a76bb97 Fix arg types for os.execv* (#1075) 2017-03-22 10:50:15 -07:00
Guido van Rossum
af2fadc180 More fixes related to PathLike (#1061)
* Make DirEntry generic over AnyStr, and inherit from PathLike if it exists

* Make pathlib require PathLike[str] (when it exists)
2017-03-21 22:26:21 -07:00
Guido van Rossum
41561f11c7 Redo PathLike without importing os into builtins. 2017-03-21 10:50:10 -07:00
Jelle Zijlstra
25464cf0a7 Merge pull request #991 from JetBrains/sproshev/pep-519
Update `open`, `os.fspath`, `os.fsencode`, `os.fsdecode`, `pathlib.PurePath` and `pathlib.Path` stubs due to PEP-519
2017-03-21 07:38:50 -07:00
Semyon Proshev
89de36afa4 Update os.fspath(path: PathLike) to return Any since Union return types are troublesome 2017-03-21 15:00:46 +03:00
David Euresti
2804788efa Bring some things back to Union types 2017-03-20 22:29:43 -07:00
David Euresti
a4d70e5b01 Bring some things back to Union types 2017-03-20 22:26:06 -07:00
David Euresti
eb5d8c9cf2 Missed some that were marked as str 2017-03-20 22:12:58 -07:00
David Euresti
66fbb26aec Use Union[bytes, Text] in os.pyi
In order to unify these two versions I'm making all paths be _PathType = Union[bytes, Text]
Fixes #439
2017-03-20 21:56:14 -07:00
Semyon Proshev
99a1afd72b Update input parameter type for os.fsencode (+bytes) and os.fsdecode (+str). 2017-03-18 18:12:27 +03:00
Eddie Antonio Santos
a2fe3f4c59 Add os.supports_* sets (new in 3.3) (#1005)
* Add os.supports_* sets (new in 3.3)
* Use Callable[..., Any] instead of builtin.function.
2017-03-15 22:24:16 -07:00
Semyon Proshev
10860386d8 Update stubs for os.path, os.fsencode and os.fsdecode functions due to PEP-519. 2017-03-13 18:34:18 +03:00
Avy Faingezicht
abd2995bad add stub for os.get_terminal_size in python3 (#859) 2017-01-23 09:06:39 -08:00
David Fisher
2cb8e184cc Add NoReturn (#811)
* Add NoReturn
2017-01-04 13:38:05 -08:00
Lukasz Langa
68a49c2c2e Fixing flake8 E111, E114, E116, E203, E225, E262 errors 2016-12-20 01:39:18 -08:00
Lukasz Langa
6eb97964fd Fixing flake8 E401, E402 errors 2016-12-20 00:47:51 -08:00
Lukasz Langa
147772950f Fixing flake8 E265 errors 2016-12-20 00:16:44 -08:00
Lukasz Langa
67e38b6806 Fixing flake8 E231 errors 2016-12-19 23:53:19 -08:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Philip House
04f5c5699e Merge 3.4 and 3.5 pathlib stubs (#764)
Fixes #659
2016-12-13 12:03:03 -08:00
George King
e7db9cda4d Add stub for os.path.commonpath (new in 3.5). (#738)
* Add stub for os.path.commonpath (new in 3.5).
2016-12-07 14:47:04 -08:00
jgarvin
88350e7f47 Add ns accurate times in os.stat_result (#686) 2016-11-12 17:20:00 -08:00
Kai Lautaportti
c8f324298d Added typing for os.cpu_count() (#628) 2016-10-25 10:46:33 -07:00
Matthias Kramm
94d3ddb60a change the way 'os' imports 'os.path' (#601)
* use 'from . import path' instead, in both PY2 and PY3
* update blacklist to include os/__init__.pyi
2016-10-17 17:49:12 -07:00
Daniël van Eeden
d315ceb060 Add os.scandir and os.DirEntry (#424)
Introduced in Python 3.5
2016-08-03 15:40:00 -07:00
Guido van Rossum
1c4662d2f3 Two small changes to help the mypy test suite pass (#355)
* Condition arg for skip{If,Unless} should be object, not bool.

* Env arg to os.get_exec_path() is a Mapping, not a Dict.
2016-07-12 14:10:36 -07:00
tharvik
1833e8e4b6 add some types to os 2016-07-11 15:09:52 +02:00
Eklavya Sharma
c98c2afb58 os: Add buffering to fdopen. (#337) 2016-07-04 20:12:06 -07:00
Alvaro Caceres
d0ac66f5f8 Use "..." for attribute values, instead of None, [], {} 2016-06-15 14:10:04 -05:00
thomascellerier
f45c00f129 Added os.sync, os.truncate and os.fwalk for Python version >= 3.3 (#293) 2016-06-15 09:53:26 -07:00
Eklavya Sharma
b56ebf2b6a Make os.name str in python 3. (#296) 2016-06-14 16:30:07 -07:00
James Tatum
33fe6a0685 Add os.replace() 2016-05-07 13:22:16 -07:00
Jukka Lehtosalo
a5d5dcc4f4 Fixes to os.environ (#172)
Add os.environ.copy() to Python 2 stubs. Fix return
type of os.environ.copy().
2016-04-28 11:53:51 +01:00
Tim Abbott
0632f2e530 Add missing exec*, EX_* stubs for python 2 and fix py3 types. 2016-01-29 17:54:24 -08:00
Tim Abbott
c2555b3119 Port stub for os.walk from python 3 to 2 and cleanup comment. 2016-01-26 16:30:15 -08:00
Matthias Kramm
94c9ce8fd0 Consistently use '= ...' for optional parameters. 2015-11-09 13:55:02 -08:00
Matthias Kramm
d2a3d4a4ed Use explicit "# type: str" instead of '' shortcut. 2015-11-09 07:59:24 -08:00
Matthias Kramm
9edaf83284 Apply stub fixes from o11c.
These are extracted from https://github.com/JukkaL/mypy/pull/721
2015-10-01 14:53:57 -07:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00