Skip to content

Fix identity comparison in toctree_tags.py#1949

Open
llukito wants to merge 1 commit intohuggingface:mainfrom
llukito:fix/toctree-none-comparison
Open

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

Conversation

@llukito
Copy link

@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).
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.

1 participant