mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 19:17:16 +08:00
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
This commit is contained in:
1
stubs/Pygments/@tests/requirements-stubtest.txt
Normal file
1
stubs/Pygments/@tests/requirements-stubtest.txt
Normal file
@@ -0,0 +1 @@
|
||||
sphinx
|
||||
12
stubs/Pygments/@tests/stubtest_allowlist.txt
Normal file
12
stubs/Pygments/@tests/stubtest_allowlist.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
# Pygments uses mcs, pyright wants cls
|
||||
pygments.lexer.LexerMeta.__new__
|
||||
pygments.style.StyleMeta.__new__
|
||||
|
||||
# Defined in lexer classes, intended to be used as static method, but doesn't use @staticmethod
|
||||
pygments.lexer.LexerMeta.analyse_text
|
||||
|
||||
# Inheriting from tuple seems to do something weird
|
||||
pygments.token.Number
|
||||
pygments.token.String
|
||||
pygments.token.Token
|
||||
pygments.token.Whitespace
|
||||
Reference in New Issue
Block a user