Commit Graph

5551 Commits

Author SHA1 Message Date
Nikita Sobolev
c8bfa511f7 Add TODO to support Concatenate in curses (#7018) 2022-01-24 12:13:18 +02:00
Nipunn Koorapati
35064a7f75 Bump to mypy-protobuf 3.2.0 (#7013) 2022-01-23 14:49:33 -08:00
Nikita Sobolev
dc176d70ec Use ParamSpec in unittest.async_case (#7011) 2022-01-23 13:54:06 -08:00
Nikita Sobolev
166d6c618c Use ParamSpec in profile.Profile.runcall (#7010) 2022-01-23 13:34:40 -08:00
Nikita Sobolev
a4db42ee34 Use ParamSpec in pdb.runcall (#7009) 2022-01-23 13:34:34 -08:00
Nikita Sobolev
5b45601ed3 Use ParamSpec in cProfile.Profile.runcall (#7008) 2022-01-23 13:34:26 -08:00
Nikita Sobolev
2244bdfa15 Use ParamSpec in contextlib (#7007) 2022-01-23 13:22:05 -08:00
Nikita Sobolev
8502c8635f Use ParamSpec for bdb.Bdb.runcall (#7006) 2022-01-23 13:17:16 -08:00
Jelle Zijlstra
c8471ea631 use flake8-pyi 22.1.0 (#7004) 2022-01-23 12:43:48 -08:00
Nikita Sobolev
e6cf110100 Improve FunctionType.__get__ with @overload (#7005) 2022-01-23 12:38:09 -08:00
Nikita Sobolev
64bb71d7c1 Improve >, <, etc for UUID type (#7001) 2022-01-23 18:59:56 +01:00
Jelle Zijlstra
3d28f0981f bs4: Expose bs4.SoupStrainer and bs4.Tag (#7002) 2022-01-23 19:11:38 +02:00
Akuli
dff461fc6a improve tkinter.Treeview.heading and tkinter.Treeview.item (#6999) 2022-01-23 14:53:30 +01:00
Nikita Sobolev
c339159cbf Improve wave.open type with overloads (#7000) 2022-01-23 14:39:31 +01:00
Nikita Sobolev
7ab84cfebf Fix writeframes type in wave (#6997) 2022-01-22 12:11:58 -08:00
Jelle Zijlstra
de5ec6a0d1 fix incorrect tuple[T] (#6996)
Found from PyCQA/flake8-pyi#135.
2022-01-22 09:37:14 -08:00
Alex Waygood
049a260acb Use class-based syntax for TypedDict in Flask-Cors/flask_cors/core.pyi (#6995)
Refs https://github.com/PyCQA/flake8-pyi/pull/133
2022-01-22 08:46:15 -08:00
kasium
57a854652a Add missing default values to flask-cors cross_origin (#6994) 2022-01-22 08:10:23 -08:00
kasium
6a273231f5 Add __getattr__ to flask-sqlalchemy (#6993)
The SQLAlchemy class exposes dynamically classes of SQLAlchemy. The exact classes depend on used SQLAlchemy version.
2022-01-22 08:10:10 -08:00
Nikita Sobolev
16e9292561 Use ParamSpec for weakref.finalize (#6992) 2022-01-22 07:26:37 -08:00
Akuli
a22ca2ec51 make the default positional-or-keyword in Mapping.get and MutableMapping.pop (#6694) 2022-01-22 07:19:01 -08:00
kasium
30133bb2fb Add stubs for flask-cors (#6939) 2022-01-22 07:14:55 -08:00
q0w
4e97b06175 Use MutableMapping for headers (#6969) 2022-01-22 12:01:29 +02:00
Alex Waygood
d053d8ffea Make mapping attribute read-only on dict views classes (#6991) 2022-01-22 11:49:59 +02:00
Nikita Sobolev
f5db1ccbbd Use tuple of Literal types in functools.pyi (#6915) 2022-01-21 20:51:52 -08:00
Jasha10
7c4ca27083 builtins.filter compat with typing.TypeGuard (#6726)
This change enables the following use-case:
```python
def is_not_none(x: Optional[int]) -> TypeGuard[int]:
    return x is not None

list_optional: list[Optional[int]] = [0, None, 1, None, 2]
generate_ints: Iterable[int] = filter(is_not_none, list_optional)
```

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-21 20:48:02 -08:00
kasium
2bf7458091 Add stubs for invoke (#6938) 2022-01-21 20:44:26 -08:00
Sebastian Rittau
46159aeca3 Update SQLAlchemy stubs for 1.4.31 (#6990) 2022-01-21 18:10:25 -08:00
Lev
9b5011759f Add missing context manager stub for JACK Client (#6982)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-21 16:57:31 -08:00
Nikita Sobolev
70e51f6f20 Use Literal types in zlib (#6988) 2022-01-21 08:50:30 -08:00
kasium
3a22bf2411 Add stubs for Flask-SQLAlchemy (#6946) 2022-01-20 13:10:26 -08:00
Alex Waygood
76af72831a Use the Literal["foo", "bar"] syntax consistently (#6984) 2022-01-20 20:16:04 +02:00
Nikita Sobolev
7dd35556c4 Use more precise type for gettext.find (#6980)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-20 18:43:18 +02:00
Akuli
61495d80aa Automatically create an issue if the nightly stubtest run fails (#6978)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-20 18:24:14 +02:00
Versus
556e623a81 Add mmap.MAP_POPULATE from 3.10 (#6964) 2022-01-20 14:30:27 +01:00
Alex Waygood
bcd9ca47f6 Remove unneeded # noqa comment (#6979) 2022-01-20 14:11:23 +01:00
Sebastian Rittau
852723aa69 Temporarily pin Python 3.9.9 and 3.10.1 for stubtest (#6974) 2022-01-20 11:47:46 +01:00
Sebastian Rittau
fb6c9621d6 Update SQLAlchemy stubs for 1.4.30 (#6973) 2022-01-20 12:34:02 +02:00
Nikita Sobolev
e553f8cb5a Use stricter Random.seed type (#6924) 2022-01-19 22:23:41 -08:00
Christian Bundy
4d085fbfc1 Fix strtobool type annotation (#6970)
Problem: strtobool returns either 0 or 1, not bool.

Solution: Fix type annotation.
2022-01-19 21:57:47 -08:00
Jelle Zijlstra
1f000d2881 Improve type for setdefault() (#6941)
- With one argument, it may return None
- With two arguments, it returns the default's type or the dict's value type.
- Also remove incorrect `= ...` from `pop()`. The one-argument case has its own overload.

Context: https://github.com/python/typing/discussions/1033#discussioncomment-1986359

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-01-19 21:44:15 -08:00
Alex Waygood
aea52b35d1 Remove nearly all __str__ and __repr__ methods from typeshed (#6968) 2022-01-20 00:45:11 +01:00
Alex Waygood
fe6233a8c3 Add Y027 to list of ignored .flake8 error codes (#6962)
Refs https://github.com/PyCQA/flake8-pyi/pull/104
2022-01-19 07:17:30 -08:00
Nikita Sobolev
3d1014f389 Make all types in contexvars explicitly @final (#6966) 2022-01-19 07:12:32 -08:00
Sebastian Rittau
5bf672ce42 Update redis stubs to 4.1.1 (#6960)
Closes: #6951
2022-01-19 07:05:15 -08:00
Sebastian Rittau
28faad6143 Unpin 3.10.1 (#6965) 2022-01-19 06:44:31 -08:00
Alex Waygood
2170693e11 Add various __*or__ methods, and improve dict.__ior__ (#6961) 2022-01-19 12:24:16 +01:00
Jelle Zijlstra
30580a3732 disable Y026 in typing.pyi too (#6959) 2022-01-18 20:14:55 -08:00
Jelle Zijlstra
65a8825e2f Disable Y026 from flake8-pyi (#6958)
Dependent on PyCQA/flake8-pyi#101.
2022-01-18 20:07:34 -08:00
Jelle Zijlstra
a0d748de2f Revert "Temporarily fix redis version to 4.1.0" (#6957)
This reverts commit 7d2de33bba.
2022-01-18 15:09:19 -08:00