Commit Graph

4 Commits

Author SHA1 Message Date
Charly C
389b92cb04 fix the stub files for the stdlib mmap module (#5705)
In Python 3:
- The `mmap` type is `Iterable[int]`, not `Iterable[bytes]`.
- The `read_byte` method returns an `int`, and the `write_byte` method only accepts an `int` as its first and only argument.
- The `__setitem__` method accepts any `ReadableBuffer` object, not just `bytes`.

In both Python 2 and 3:
- The `__delitem__` method always raises a `TypeError`, so the proper return type is `NoReturn`.
- The `mmap` type isn't generic, so I've simplified the stubs by removing the unnecessary `_mmap` class.
2021-06-29 08:01:32 -07:00
Akuli
15b0959cf8 stdlib/@python2: clean imports (#5453) 2021-05-15 01:08:37 +02:00
Akuli
5ec4f06263 clean python 3 specific stuff from stdlib/@python2 stubs (#5451) 2021-05-15 00:19:05 +02:00
Sebastian Rittau
5b739e0ccb Split stdlib into Python 2 and 3 versions (#5442)
All new files in stdlib/@python2 are straight copies of the
corresponding files in stdlib.
2021-05-14 12:04:12 -07:00