Commit Graph

69 Commits

Author SHA1 Message Date
Avasam
078c6a0958 Update Unused parameters in stubs/ (#9704)
* Update _Unused TypeAlias

* Update `object | None` params

* Replace unused `object` parameters with `Unused` alias
2023-02-21 23:52:52 -08:00
Alex Waygood
7180d0223b Use typing_extensions.Self instead of _typeshed.Self (#9702) 2023-02-15 11:32:43 +01:00
Avasam
f1aede7162 Manual changes of Any union to Incomplete in stubs folder (#9566)
- ClassVar[Any | None]
- Missed previous changes due to alias
- Manual review of leftover Any unions (`| Any` and `Any |`)
2023-02-02 06:48:41 -08:00
Avasam
6ac24ed923 Replace Any with Incomplete in many places (#9565) 2023-01-18 19:12:46 +00:00
Alex Waygood
4fea314594 Replace Any with Incomplete in many places (#9558) 2023-01-18 08:48:16 +00:00
Avasam
85792bca71 Fix stubtest for sqlalchemy.testing.plugin.pytestplugin (#9533) 2023-01-14 13:38:20 +00:00
Sebastian Rittau
b8f337a452 SQLAlchemy: Annotate text() (#9498) 2023-01-11 15:01:11 +00:00
Avasam
5f08529a4d SQLAlchemy: Remove some implementation details (#9492)
Stubs for the mypy plugin, which aren't useful if you're using typeshed's SQLAlchemy stubs, have been removed.
2023-01-11 11:21:18 +00:00
Sebastian Rittau
b1cb9c8a8f Update SQLAlchemy stubs to 1.4.46 (#9464)
Replace `Any` with `Incomplete` where applicable
2023-01-05 19:37:12 +00:00
Avasam
23ac9bff19 Check for unused pyright: ignore and differentiate from mypy ignores (#9397) 2022-12-28 10:44:29 +00:00
Sebastian Rittau
d30941c747 Update to SQLAlchemy 1.4.45 (#9359)
Use Incomplete in touched files
2022-12-14 11:02:16 +00:00
Nikita Sobolev
c6800d1214 sqlalchemy: add return types for known magic methods (#9290) 2022-11-27 23:55:36 -08:00
Nikita Sobolev
18e2ae762b Mark first argument of __[get|set|del]attr__ as str (#9245) 2022-11-22 11:06:50 +00:00
Nikita Sobolev
c6261372d7 Always use bool and Literal for Python compat code (#9213) 2022-11-16 18:00:59 +00:00
Nikita Sobolev
04ae11cdd0 All __nonzero__ are methods that return bool (#9139) 2022-11-09 14:53:42 +00:00
Nikita Sobolev
62a6c3d616 Annotate known magic-method return types (#9131) 2022-11-08 18:28:42 +00:00
Alex Waygood
2b5afd9cc9 Fix stubtest failures on SQLAlchemy (#8914) 2022-10-17 12:43:52 +02:00
Nikita Sobolev
3e828bd307 Remove empty __init__ methods from classes with 0 parents (#8907) 2022-10-16 12:47:47 +01:00
kasium
66751e2ebf Reexport NoResultFound in orm/exc (#8782) 2022-09-22 11:57:29 +02:00
Nikita Sobolev
43d4174590 SQLAlchemy: Use ParamSpec for Engine.transaction() and Engine.run_callable() (#8718) 2022-09-10 16:29:54 +01:00
Alex Waygood
f2283d519e Fix stubtest failures on SQLAlchemy (#8524) 2022-08-10 11:48:46 -07:00
Alex Waygood
fdeb216547 Remove or move several TypeAlias declarations (#8444) 2022-07-30 15:28:52 +01:00
Kevin Kirsche
16e44d560f Fix TODO RE: Use of Concatenate and ParamSpec in sqlalchemy (#8415) 2022-07-27 20:00:43 -07:00
Aksel Lunde Aase
e853d5608e SQLAlchemy: Fix annotations for Query.{update,delete} (#8388)
Closes: #8387
2022-07-26 11:21:10 +02:00
Alex Waygood
e3d4bdc91a Third-party stubs: enforce CamelCase for type alias names (#8256)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-07-19 08:23:24 +01:00
Sebastian Rittau
faae950ade Use error codes for type ignores (#8280)
Disable reportSelfClsParameterName for pytype as this is out of typeshed's
control

Closes: #7497
2022-07-12 20:15:49 +02:00
Alex Waygood
edc0ecd857 Remove Python 3.6 branches from typeshed (#8269) 2022-07-11 10:55:17 +02:00
Andrey
b145b32aa9 Add Session annotation for sessionmaker call (#8257) 2022-07-08 10:31:36 +01:00
Alex Waygood
850bc78a45 Improve SQLAlchemy type aliases (#8252)
* Remove `sqlalchemy.dbapi` (in favor of `_typeshed.dbapi`).
* Don't re-export mypy imports from `sqlalchemy.ext.mypy.*`.
2022-07-07 14:11:08 +02:00
Alex Waygood
b550d463c7 Fix stubtest failures on SQLAlchemy (#8148) 2022-06-25 11:34:47 +05:30
Alex Waygood
89f4dee452 Improve several __hash__ methods (#8128) 2022-06-22 11:58:00 +01:00
Alex Waygood
6b0c8df9ec Upgrade pyright, improve pyright config files (#8072) 2022-06-16 18:50:50 +01:00
Alex Waygood
a2ef47660a Fix TypeVars in beautifulsoup and SQLAlchemy (#8087) 2022-06-16 17:34:27 +02:00
Alex Waygood
43a9ab08d7 Always use TypeAlias when assigning to Any (#8021) 2022-06-05 18:16:20 -07:00
Sebastian Rittau
07ac9675e4 SQLAlchemy 1.4.37 fixes (#8003)
Closes: #8001
2022-06-01 09:50:40 +01:00
Jelle Zijlstra
789c12ad90 constructors: Fix defaulted TypeVars (#7965)
From the list in https://github.com/microsoft/pyright/issues/3501
2022-05-27 07:32:56 +01:00
Alex Waygood
fa636bc044 Third-party stubs: fix several fictitious type aliases (#7958) 2022-05-26 06:26:26 -07:00
Sebastian Rittau
b211bf31a3 Update testing_engine() annotations (#7818) 2022-05-10 12:46:01 +03:00
Alex Waygood
5c6178a821 Import generics from standard modules in all third-party stubs (#7791) 2022-05-07 10:35:50 +02:00
Sebastian Rittau
2d468966f5 Add various missing generic arguments (#7702)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-04-27 15:25:35 +03:00
Andrey
4a701642f2 Add typing for __iter__ in sqlalchemy.orm.Query (#7666) 2022-04-20 10:55:12 +01:00
Alex Waygood
653f2c6ba4 Third-party stubs: import from collections.abc where possible (#7637) 2022-04-16 14:52:57 +01:00
Alex Waygood
740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
hasier
21171f1cb9 SQLAlchemy improvements for Operators (#7604) 2022-04-07 19:45:27 +02:00
hasier
754f421990 SQLAlchemy improvements for generative methods (#7603) 2022-04-07 13:06:46 +02:00
Alex Waygood
85aec034ae Mark many attributes as read-only properties (#7591) 2022-04-05 08:37:24 +02:00
Sebastian Rittau
4c9dc43c87 Update SQLalchemy to 1.4.34 (#7573)
Closes: #7572
2022-04-01 14:22:00 +01:00
Alex Waygood
a3245db63c Remove unneeded # noqa comments, fix broken # noqa comments (#7561) 2022-03-28 23:17:44 +02:00
Alex Waygood
340c6c97ed Add mypy error codes to type: ignores, remove unused ignores (#7504)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-19 13:10:00 +00:00
Sebastian Rittau
108b6fb091 pyright: Don't report incompatible overrides (#7498)
These overrides are inherited from the implementation and are out of
typeshed's control.
2022-03-16 16:20:06 +01:00