Commit Graph

9 Commits

Author SHA1 Message Date
Cebtenzzre
58ee9c0ae5 termios: Fix type of tcgetattr and tcsetattr attributes (#4662)
Returning a union from tcgetattr forces the caller to use isinstance or
a type: ignore comment if they modify the returned list. Return
List[Any] instead.

The cc field has ints at cc[termios.VTIME] and cc[termios.VMIN] if
lflag & termios.ICANON is zero. Change _Attr to allow this.

Fixes #4661
2020-10-12 18:24:09 -07: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
Jelle Zijlstra
d0b85d7efe remove _types (#4220) 2020-06-11 09:10:52 +02:00
Daniel Farley
955e9c7da4 Unify file descriptor definitions (#3584)
The _types module can house any common type defintions used throughout
the rest of typeshed to keep defintions in sync.

First candidate is file descriptors where anything with `fileno()`
method is accepted. There were several different implementations in
various files that can be unified.
2020-01-08 17:25:36 -08:00
Jonathan Slenders
337c382196 Added termios.error (#2951) 2019-05-04 16:13:53 -04:00
Michael Lee
efb67946f8 Use variable annotations everywhere (#2909) 2019-04-13 10:40:52 +02:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Valérian Rousset
ebdf9d68b2 add termios (#456) 2016-08-10 12:09:54 -07:00