KEMBAR78
Docs: adding missing `mutable-override` to section title by jamesbraza · Pull Request #16886 · python/mypy · GitHub
Skip to content

Conversation

jamesbraza
Copy link
Contributor

Closes #16880
Supercedes #16881

@jamesbraza jamesbraza changed the title Docs: adding missing mutable-override to section title Docs: adding missing mutable-override to section title Feb 6, 2024
@jamesbraza
Copy link
Contributor Author

Cc @ilevkivskyi since he authored this rule in #16399


This will enable the check for unsafe overrides of mutable attributes. For
historical reasons, and because this is a relatively common pattern in Python,
Introduced in Mypy version 1.8,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to mention the version, unless perhaps if you want to go through and do it for all the other codes. The docs already prominently say the version at the top, and users should know that if they use an older version, they should consult that version's documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay sounds good! Yeah I had added it because I was initially using 1.7.1, and it wasn't there. However, I agree with your logic too, so will remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed that change

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@JelleZijlstra JelleZijlstra merged commit 5c5f3ad into python:master Feb 7, 2024
@jamesbraza jamesbraza deleted the mutable-override-docs branch February 7, 2024 00:55
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.

mutable-override not in docs header correctly

2 participants