mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-03 06:28:28 +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:
@@ -0,0 +1 @@
|
||||
sphinx
|
||||
@@ -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