Skip to content
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

Freeze empty classes #3453

Merged
merged 2 commits into from Jan 1, 2023
Merged

Freeze empty classes #3453

merged 2 commits into from Jan 1, 2023

Conversation

Bibo-Joshi
Copy link
Member

Closes #3452

I decided to just add __init__ methods to the empty classes that call self._freeze(). That requires fewer changes than setting self._freeze = True in TO.__init__ and using with self._unfrozen() in all the classes …

Checklist for PRs

  • [ ] Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • [ ] Added myself alphabetically to AUTHORS.rst (optional)
  • [ ] Added new classes & modules to the docs and all suitable __all__ s

@Bibo-Joshi Bibo-Joshi merged commit 7b61a30 into master Jan 1, 2023
@Bibo-Joshi Bibo-Joshi deleted the freeze-bug branch January 1, 2023 12:04
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Telegram classes with no custom __init__ are not frozen by default
3 participants