Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add visit_* and depart_* methods to docutils visitor classes #13928

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

Merged
merged 12 commits into from
May 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Add signature override for visit_comment
  • Loading branch information
bzoracler authored May 4, 2025
commit 9bd953588e37a0822bec926c67649dd95c6b1acf
10 changes: 10 additions & 0 deletions 10 stubs/docutils/docutils/writers/manpage.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import re
from _typeshed import Incomplete
from collections.abc import Callable
from typing import Protocol, type_check_only
from typing_extensions import Never

from docutils import nodes

@type_check_only
class _RegexPatternSub(Protocol):
# Matches the signature of the bound instance method `re.Pattern[str].sub` exactly
def __call__(self, /, repl: str | Callable[[re.Match[str]], str], string: str, count: int = 0) -> str: ...

class Translator(nodes.NodeVisitor):
def visit_admonition(self, node: nodes.admonition, name: str | None = None) -> None: ...
def visit_comment(self, node: nodes.comment, sub: _RegexPatternSub = ...) -> Never: ...
def __getattr__(self, name: str, /) -> Incomplete: ...

def __getattr__(name: str) -> Incomplete: ...
Morty Proxy This is a proxified and sanitized view of the page, visit original site.