Skip to content

Conversation

@orionarcher
Copy link
Collaborator

Summary

  • Replace vars(state) with state.attributes in almost all cases to enable private attributes with setters.

Checklist

Before a pull request can be merged, the following items must be checked:

  • Doc strings have been added in the Google docstring format.
  • Run ruff on your code.
  • Tests have been added for any new functionality or bug fixes.

is_special_attribute = attr_name.startswith("__")
is_property = attr_name in vars(cls) and isinstance(
vars(cls).get(attr_name), property
is_private_attribute = attr_name.startswith("_") and not attr_name.startswith(
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can do and not is_special_attribute here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done, otherwise gtg?

@thomasloux
Copy link
Collaborator

Great, thanks !!

@orionarcher orionarcher merged commit 18f5145 into main Oct 31, 2025
135 of 139 checks passed
@orionarcher orionarcher deleted the vars_to_attributes branch October 31, 2025 18:51
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.

4 participants