Skip to content

Conversation

@AA-Turner
Copy link
Member

No description provided.

def visit_topic(self, node: Element) -> None:
# ignore TOC's since we have to have a "menu" anyway
if 'contents' in node.get('classes', ()):
if (classes := node.get('classes', ())) and 'contents' in classes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced that this line is improved by this change - is it in response to a pyright warning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but yes it's in response to pyright's 'unnecessary contains' warning.

A

@AA-Turner AA-Turner merged commit 63f80ad into sphinx-doc:master Nov 28, 2025
30 checks passed
@AA-Turner AA-Turner deleted the typing/pyright-config branch November 28, 2025 00:40
@AA-Turner AA-Turner added this to the 9.0.0 milestone Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants