Skip to content

Fix identity comparison in toctree_tags.py#1949

Merged
ArthurZucker merged 1 commit intohuggingface:mainfrom
llukito:fix/toctree-none-comparison
Mar 25, 2026
Merged

Fix identity comparison in toctree_tags.py#1949
ArthurZucker merged 1 commit intohuggingface:mainfrom
llukito:fix/toctree-none-comparison

Conversation

@llukito
Copy link
Copy Markdown
Contributor

@llukito llukito commented Feb 13, 2026

Replaced != None with is not None in docs/source/_ext/toctree_tags.py.

Comparisons to singletons like None should always be done with is or is not, never the equality operators (PEP 8 recommendations).

Replaced `!= None` with `is not None` in `docs/source/_ext/toctree_tags.py`.

Comparisons to singletons like `None` should always be done with `is` or `is not`, never the equality operators (PEP 8).
@llukito
Copy link
Copy Markdown
Contributor Author

llukito commented Feb 18, 2026

Hi, just checking in on this, it’s ready for review whenever someone has a moment. Thanks!

Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Sure

@ArthurZucker ArthurZucker merged commit 2044dca into huggingface:main Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants