Commit Graph

47 Commits

Author SHA1 Message Date
Alex Waygood
fe9eb630ee Various improvements to Markdown stubs (#10008) 2023-04-04 12:56:03 +01:00
Alex Waygood
bb7c376142 Add defaults for third-party stubs M-O (#9956) 2023-03-27 19:20:30 +02:00
Avasam
ed6748fb32 Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
2023-02-20 22:37:45 +00:00
Alex Waygood
7180d0223b Use typing_extensions.Self instead of _typeshed.Self (#9702) 2023-02-15 11:32:43 +01:00
Anders Kaseorg
8e0b56f12c Add markdown.treeprocessors.UnescapeTreeprocessor (#9671)
This replaced the deprecated
`markdown.postprocessors.UnescapePostprocessor` in
https://github.com/Python-Markdown/markdown/pull/1272.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-02-09 17:22:23 +00:00
Alex Waygood
4fea314594 Replace Any with Incomplete in many places (#9558) 2023-01-18 08:48:16 +00:00
Anders Kaseorg
9da105d4d9 markdown: Specify md type (#8857)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-10-06 14:20:05 -07:00
Oleh Prypin
30e47fc8ae Add markdown.util.nearing_recursion_limit (#8764) 2022-09-18 13:06:55 +01:00
Oleh Prypin
d08e8baef7 Markdown: BlockProcessor.detab returns a pair of strings (#8586) 2022-08-21 19:59:41 +01:00
Shantanu
38407a7904 [stubsabot] Bump Markdown to 3.4.* (#8309) 2022-07-18 13:04:27 +02:00
Lee
a4b6d0b434 markdown: remove deleted methods of Registry. (#8197) 2022-07-15 22:29:13 +01:00
Alex Waygood
6348a58b8b Import Match and Pattern from re, not typing (#8277) 2022-07-12 15:32:48 +02:00
Anders Kaseorg
9ff393558a Markdown: Fix BlockProcessor method return types (#8166)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-06-26 11:30:39 +05:30
Lee
70d903c8b6 markdown: annotate HtmlStash. (#8067) 2022-06-13 10:47:51 +02:00
Lee
a0c65022c6 markdown: remove INSTALLED_EXTENSIONS. (#8002) 2022-06-01 10:26:00 +02:00
Lee
e8f20bbb56 markdown: add Markdown.registeredExtensions (#7997) 2022-05-31 14:10:30 +01:00
Lee
8f7786c7df markdown: annotate Registry.__len__(). (#7986) 2022-05-30 02:10:07 +01:00
Lee
1eef7365b9 markdown: remove __getattr__() (#7962) 2022-05-27 23:12:22 -07:00
Lee
597be79b18 markdown: annotate __deprecated__ (#7955) 2022-05-26 07:23:59 +01:00
L
1e097a75cb markdown: Annotate methods of Registry (#7926)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-05-24 10:23:48 -07:00
L
4a08afcbc2 markdown: Annotate parseBoolValue() (#7875) 2022-05-18 20:20:23 -07:00
L
ada3615a24 markdown: Annotate code_escape(). (#7857) 2022-05-17 17:54:25 -07:00
Sebastian Rittau
a05ee9740d Markdown: use I/O protocols (#7851) 2022-05-17 15:00:59 +02:00
L
81be86af6e markdown: Annotate Registry.get_index_for_name() (#7848) 2022-05-17 11:48:55 +02:00
L
487bef5a67 markdown: isBlockLevel() returns a bool value. (#7839) 2022-05-16 15:52:22 +02:00
L
dbccdcb50e markdown: @deprecated argument of message is a str. (#7835) 2022-05-12 18:48:20 -07:00
L
f8db698ece markdown: PY37 is a bool (#7831) 2022-05-11 19:46:50 -07: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
Alex Waygood
819900fa55 Python 3 stubs: use str instead of typing.Text (#7638) 2022-04-16 15:47:00 +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
96c9abb058 Always use _typeshed.Self, where applicable (#6880)
* Always use `_typeshed.Self`, where applicable

* Revert changes to `google-cloud-ndb` (ambiguous)

* Remove empty line added by script

* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`

* Manually add a few more that the script missed

* Improve `filelock` annotation

Source code here: 79ec7b2826/src/filelock/_api.py (L207)

* Improve `opentracing/scope` annotation

Source code here: 3e1d357a34/opentracing/scope.py (L71)

* Improve `redis/client` stub

Source code here: 15f315a496/redis/client.py (L1217)

* Improve `redis/lock` annotation

Source code here: 15f315a496/redis/lock.py (L155)

* Improve `requests/models` annotation

Source code here: d718e75383/requests/models.py (L653)
2022-01-09 19:16:19 -08:00
Alex Waygood
8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Akuli
a5bc1e037f Add mypy error codes to '# type: ignore' comments (#6379) 2021-11-26 07:07:56 +01:00
Sebastian Rittau
9c2be9500a Add hilite(shebang) argument and return type (#6316) 2021-11-16 09:17:08 -08:00
Bob Thomas
a0c0435e95 Add markdown.blockprocessors.ReferenceProcessor (#6270) 2021-11-09 18:47:25 +02:00
Akuli
994b69ef8f Use lowercase tuple where possible (#6170) 2021-10-14 17:18:19 -07:00
Sebastian Rittau
9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Shantanu
c7ac9b6641 markdown: fix type of Pattern (#6115)
Surfaced weirdly by #6109

Co-authored-by: hauntsaninja <>
2021-10-04 21:35:26 -07:00
Akuli
eb7b97ee78 Add types to Markdown (#6045)
Most methods and attributes were previously untyped or `Any`-typed.

Co-authored-by: PythonCoderAS <13932583+PythonCoderAS@users.noreply.github.com>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-09-20 18:39:53 +03:00
Akuli
ce11072dbe Big diff: use lower-case list and dict (#5888) 2021-08-08 09:26:35 -07:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Sebastian Rittau
b1ef60c9d5 Update a few stub versions (#5670) 2021-06-21 07:15:00 -07:00
Shantanu
7244ea1f71 Test third party stubs with stubtest (#5615) 2021-06-13 00:17:40 +02:00
Sebastian Rittau
711580722b Enable pyright for all Python 3 stubs (#5597)
* pyright: disable reportUnknownParameterType

Unknown parameter types are preferred over Any annotations for
incomplete stubs. Especially larger stubs are expected to be
incomplete for some time and it would be a shame to lose the
other pyright warnings for those stubs.

* Also disable reportUnknownVariableType

Fix problems with tkinter

* Disable reportUnknownMemberType

Fix pyright problems
2021-06-09 07:14:22 -07:00
Akshat
bb79dc9b51 markdown: Add missing attribute to Markdown stub. (#5544)
* markdown: Add missing attribute to Markdown stub.

* markdown: Add * to mark rest of arguments as keyword-only.

* markdown: Add **options
2021-05-29 20:40:07 +03:00
Shantanu
fc660d6d41 Move typing_extensions to stdlib (#5233)
I'm not sure what the best way to do this is. This effectively orphans
types-typing-extensions, but maybe that's not really a problem. (We can
yank the package too)

See https://github.com/python/typeshed/pull/5229#issuecomment-822234125
for some details

Co-authored-by: hauntsaninja <>
2021-04-20 21:55:48 -07:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00