Commit Graph

42 Commits

Author SHA1 Message Date
github-actions[bot]
8ff50fbea2 [stubsabot] Bump Pygments to 2.18.* (#11861)
Release: https://pypi.org/pypi/Pygments/2.18.0
Homepage: https://pygments.org
Repository: https://github.com/pygments/pygments
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/Pygments
Changelog: https://github.com/pygments/pygments/blob/master/CHANGES
Diff: https://github.com/pygments/pygments/compare/2.17.2...2.18.0

Stubsabot analysis of the diff between the two releases:
 - 5 public Python files have been added: `pygments/lexers/mojo.py`, `pygments/lexers/soong.py`, `pygments/lexers/tact.py`, `pygments/lexers/typst.py`, `pygments/styles/coffee.py`.
 - 0 files included in typeshed's stubs have been deleted.
 - 36 files included in typeshed's stubs have been modified or renamed.
 - Total lines of Python code added: 4858.
 - Total lines of Python code deleted: 2467.

If stubtest fails for this PR:
- Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR)
- Fix stubtest failures in another PR, then close this PR

Note that you will need to close and re-open the PR in order to trigger CI

Co-authored-by: stubsabot <>
2024-05-05 07:39:39 -07:00
Tony Narlock
96e62dd757 docutils: Use ClassVar for Directive class variables (#11550)
These are intended to be set as class variables, in subclasses of Directive, rather
than instance variables.

See also:
- https://docutils.sourceforge.io/docs/howto/rst-directives.html#the-directive-class
- https://docutils.sourceforge.io/docs/howto/rst-directives.html#admonitions
2024-03-09 14:28:35 -08:00
Sebastian Rittau
b6eaadcfe5 Update typing_extensions imports in third-party stubs (#11245) 2024-01-05 15:40:13 +01:00
Sebastian Rittau
30f7267b5d Bump pygments to 2.17 (#11051)
* Add some previously missing lexers.
* Improve lexer type annotations.
2023-11-23 14:55:38 +00:00
Jonathan Slenders
7ef466e88d Add types for pygments.lex. (#10998) 2023-11-09 10:40:24 +01:00
github-actions[bot]
e787a88f59 [stubsabot] Bump Pygments to 2.16.* (#10536)
Release: https://pypi.org/pypi/Pygments/2.16.1
Homepage: https://pygments.org
Repository: https://github.com/pygments/pygments
Changelog: https://github.com/pygments/pygments/blob/master/CHANGES
Diff: https://github.com/pygments/pygments/compare/2.15.1...2.16.1

Stubsabot analysis of the diff between the two releases:
 - 12 public Python files have been added.
 - 0 files included in typeshed's stubs have been deleted.
 - 6 files included in typeshed's stubs have been modified or renamed: `pygments/__init__.py`, `pygments/formatters/img.py`, `pygments/lexer.py`, `pygments/sphinxext.py`, `pygments/styles/__init__.py`, `pygments/token.py`.
 - Total lines of Python code added: 2942.
 - Total lines of Python code deleted: 477.

Co-authored-by: stubsabot <>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-07 01:37:37 +01:00
Sebastian Rittau
afe18e95a9 Add an upstream_repository field to METADATA.toml (#10487)
Closes: #10478
2023-07-20 16:45:41 +02:00
Avasam
db0149859c Add partial_stub metadata field (#10157) 2023-05-10 17:04:18 +02:00
github-actions[bot]
266f9a81b1 [stubsabot] Bump Pygments to 2.15.* (#10030)
Release: https://pypi.org/pypi/Pygments/2.15.0
Homepage: https://pygments.org
Changelog: https://github.com/pygments/pygments/blob/master/CHANGES
Diff: https://github.com/pygments/pygments/compare/2.14.0...2.15.0

Stubsabot analysis of the diff between the two releases:
 - 3 public Python files have been added: `pygments/lexers/carbon.py`, `pygments/lexers/dax.py`, `pygments/lexers/wgsl.py`.
 - 0 files included in typeshed's stubs have been deleted.
 - 28 files included in typeshed's stubs have been modified or renamed.
 - Total lines of Python code added: 2582.
 - Total lines of Python code deleted: 502.
2023-04-11 02:32:41 +01:00
Alex Waygood
6fd7e36e80 Add default values for third-party stubs beginning with 'P' (#9957) 2023-03-27 18:58:53 +01:00
Nathan Walters
28b90d9bfd Pygments: fix get_style_by_name return type (#9803) 2023-03-08 11:45:47 +02:00
Avasam
5ac80781ec Integrate requirements-stubtest.txt into METADATA.toml (#9778) 2023-02-21 11:19:50 +01: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
Avasam
372073d35b Use _typeshed.FileDescriptorOrPath in stubs (#9695) 2023-02-09 08:30:19 +01:00
Alex Waygood
4fea314594 Replace Any with Incomplete in many places (#9558) 2023-01-18 08:48:16 +00:00
github-actions[bot]
ca28b1f24d [stubsabot] Bump Pygments to 2.14.* (#9440)
Release: https://pypi.org/pypi/Pygments/2.14.0
Homepage: https://pygments.org/
Changelog: https://github.com/pygments/pygments/blob/master/CHANGES
Diff: https://github.com/pygments/pygments/compare/2.13.0...2.14.0

Stubsabot analysis of the diff between the two releases:
 - 11 public Python files have been added.
 - 0 files included in typeshed's stubs have been deleted.
 - 7 files included in typeshed's stubs have been modified or renamed: `pygments/__init__.py`, `pygments/formatters/__init__.py`, `pygments/formatters/html.py`, `pygments/formatters/irc.py`, `pygments/lexer.py`, `pygments/lexers/__init__.py`, `pygments/sphinxext.py`.
 - Total lines of Python code added: 3094.
 - Total lines of Python code deleted: 1387.

If stubtest fails for this PR:
- Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR)
- Fix stubtest failures in another PR, then close this PR

Note that you will need to close and re-open the PR in order to trigger CI

Co-authored-by: stubsabot <>
2023-01-02 00:35:13 +00:00
Nikita Sobolev
ce4668a132 Use Incomplete instead of Any in __getattr__ (#8903) 2022-10-15 18:54:21 +01:00
Chris Kuehl
44142ce13a pygments.lexers.guess_lexer_for_filename cannot return None (#8777) 2022-09-21 11:47:31 +02:00
github-actions[bot]
0d8cf74819 [stubsabot] Bump Pygments to 2.13.* (#8561)
Co-authored-by: stubsabot <>
2022-08-18 17:47:59 -07:00
Anders Kaseorg
db8f3c8f50 Pygments: add pygments.__version__ (#8241)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-07-05 20:26:08 +01:00
Shantanu
225c14c16f [stubsabot] Bump Pygments to 2.12.* (#8093)
Co-authored-by: hauntsaninja <>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-06-18 08:58:29 +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
Alex Waygood
3ab250eec8 Use PEP 604 syntax wherever possible (#7493) 2022-03-16 16:01:33 +01:00
Alex Waygood
494481a0ae Improve a bunch of __(deep)copy__ methods (#7148) 2022-02-06 15:40:44 -08:00
Jelle Zijlstra
de5ec6a0d1 fix incorrect tuple[T] (#6996)
Found from PyCQA/flake8-pyi#135.
2022-01-22 09:37:14 -08:00
Akuli
5d20635890 pygments: delete _TokenType.__init__ (#6918) 2022-01-14 19:13:14 -08:00
Sam Bull
933fec014c Pygments: make Formatter generic and improve format/highlight (#6819)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-08 20:27:51 +02:00
Alex Waygood
a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00
Alex Waygood
ab893c91fd pygments: remove outdated TODOs (#6725) 2021-12-28 22:23:23 +02:00
Alex Waygood
8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Alex Waygood
975b3e901b Always alias collections.abc.Set (#6712) 2021-12-27 17:09:47 +01:00
Sebastian Rittau
74cd202b2d Annotate return type of pygments.plugin.iter_entry_points (#6697)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-12-26 14:44:40 +01:00
Akuli
9efc0c0dca pygments: Annotate several generator functions (#6695) 2021-12-26 13:53:41 +01:00
Anthony Sottile
3008032076 pygments.formatters.get_all_formatters yields Formatters (#6636) 2021-12-20 15:21:10 -08:00
Akuli
a5bc1e037f Add mypy error codes to '# type: ignore' comments (#6379) 2021-11-26 07:07:56 +01:00
Alex Waygood
c685c2d6c6 Reduce use of deprecated typing aliases (#6358) 2021-11-23 10:56:43 +01:00
Sebastian Rittau
9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Akuli
191aac3b0e lowercase list and dict for 3rd party stubs (#5893)
* stubs/decorator/decorator.pyi

* stubs/frozendict/frozendict.pyi

* stubs/Jinja2/jinja2/nodes.pyi

* stubs/Pygments/pygments/token.pyi

* stubs/requests/requests/models.pyi

* stubs/Werkzeug/werkzeug/http.pyi
2021-08-08 13:25:18 -07:00
Akuli
ee487304d7 Big diff: Use new "|" union syntax (#5872) 2021-08-08 11:05:21 +02:00
Akuli
e676fcabd3 Create pygments stubs (#5759)
* run stubgen

* replace individual lexers with __getattr__ in lexers/__init__.pyi

* replace individual styles with __getattr__ in styles/__init__.pyi

* import-export each formatter into formatters/__init__.pyi

* clean up slightly with quick and dirty script

* manual fixing
2021-07-11 16:27:35 +03:00