-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support PEP 695 syntax for class definitions #11438
Comments
The issue lies in sphinx/sphinx/domains/python.py Lines 42 to 49 in d3c91f9
We need a better regular expression for matching this new signature. If anyone knows some magical regex for that (otherwise I'll think of it this w-e). |
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 28, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 29, 2023
picnixz
added a commit
to picnixz/sphinx
that referenced
this issue
May 30, 2023
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
PEP 695, which is implemented in the upcoming Python 3.12, adds a new syntax for defining generic classes:
I would like to document generic classes with e.g.
.. class:: Sequence[T]
, but that doesn't render correctly (theclass
introduction doesn't appear):Presumably the parser for the
class
directive needs to be taught to recognize this syntax. (Cross-ref: python/cpython#104642 (comment).)The text was updated successfully, but these errors were encountered: