Commit Graph

16 Commits

Author SHA1 Message Date
Artem Simonov
f0269cd438 fix shutil.chown type annotations (#4294)
According to the official docs, "user can be a system user name or a uid;
the same applies to group".

Co-authored-by: Artem Simonov <artem.simonov@dejero.com>
2020-06-30 09:39:38 +02:00
Jelle Zijlstra
0142a87da8 adjust isort config (#4290)
Fixes #4288.

- Default imports to THIRD_PARTY, so in effect we merge the FIRST_PARTY and THIRD_PARTY stubs. This means import order is no longer affected by whether typing_extensions is installed locally.
- Treat typing_extensions, _typeshed and some others as standard library modules.

Note that isort master is very different from the latest release; we'll have to do something
different if and when the next isort release comes out.
2020-06-29 00:00:21 -07:00
Jelle Zijlstra
5d553c9584 apply black and isort (#4287)
* apply black and isort

* move some type ignores
2020-06-28 13:31:00 -07:00
Sebastian Rittau
51cf2f51b8 Add IO protocols to _typeshed (#4230) 2020-06-14 20:44:48 +02:00
Sebastian Rittau
89d3a55f1a Preparations for the Big Reformat (#4228)
A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.

In two instances @overloads at the top of the file needed to be moved
due to psf/black#1490.
2020-06-14 07:58:26 -07:00
Jelle Zijlstra
43e93f803f use _typeshed's Path aliases (#4214) 2020-06-10 20:57:09 -07:00
layday
2bd06a0a3d Restrict shutil.move src argument to str (#3559)
See https://bugs.python.org/issue32689.
This bug only affects `src`s which are directory
Paths in Python 3.5 to 3.8 inclusive.
Comes at the cost of restricting
`src` to str even where a Path would work but
this might be preferable to exposing the bug.
2020-01-05 16:38:16 +01:00
hauntsaninja
ac2e59af81 shutil: update which for py38 (#3575) 2020-01-05 16:19:03 +01:00
layday
21a9e69612 Update shutil.unpack_archive for 3.7 and up (#3558) 2019-12-27 11:26:26 +01:00
Jelle Zijlstra
6b751ef408 shutil: Fix rmtree type (#3536)
See my comment in https://github.com/python/typeshed/issues/3533#issuecomment-563366251.
2019-12-21 12:29:59 -08:00
Sebastian Rittau
ec7960a8cb Convert namedtuples to class syntax (#3321) 2019-10-20 10:37:33 +02:00
Sebastian Rittau
8a7d61741d Python3.8 additions and changes (#3337)
* Add as_integer_ratio() to a few types

* Add dirs_exist_ok to copytree()

* int, float, complex accept __index__ args

Also fix complex.__init__ argument names

* Add __reversed__ to dict et al.

* Python 3.8 date(time) arithmetic fixes

* Add CodeType.replace()
2019-10-10 20:51:27 -07:00
Guido van Rossum
b336182b69 Fix some errors with --disallow-any-generics (#3276)
See #3267. Covers all of stdlib/2and3.
2019-09-29 09:15:27 -07:00
Siva Chandra
f73d060042 Use Text under Python 2 in shutil.pyi. (#2471) 2018-09-25 20:25:04 -07:00
Sebastian Rittau
187aaaced9 Use protocols for shutils.copyfileobj() (#2291)
See https://github.com/python/typing/issues/564 for background.
2018-06-28 10:28:24 -07:00
Sebastian Rittau
b261b228ba Merge Python 2 and 3 shutil (#2259)
* Drop support for Python 3.3
* Merge Python 2 and 3 shutil
* Marked some arguments optional
* Changed callback return type from None to Any for more flexibility
2018-06-27 20:42:58 -07:00