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

hidden attributes #1091

Closed
wants to merge 17 commits into from
Closed

hidden attributes #1091

wants to merge 17 commits into from

Conversation

A-Baji
Copy link
Collaborator

@A-Baji A-Baji commented Jun 7, 2023

No description provided.

@A-Baji A-Baji linked an issue Jun 7, 2023 that may be closed by this pull request
@A-Baji A-Baji marked this pull request as ready for review June 14, 2023 19:57
@A-Baji A-Baji requested a review from dimitri-yatsenko June 14, 2023 19:57
@A-Baji A-Baji changed the title alternate hidden attr implementation hidden attributes Jun 15, 2023
@CBroz1 CBroz1 mentioned this pull request Oct 27, 2023
Copy link
Member

@dimitri-yatsenko dimitri-yatsenko left a comment

Choose a reason for hiding this comment

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

@ethho Let's merge and this will be used in support of other features.

@@ -120,7 +121,7 @@ def table_status(self):
def attributes(self):
if self._attributes is None:
self._init_from_database() # lazy loading from database
return self._attributes
return {k: v for k, v in self._attributes.items() if not v.is_hidden}
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: this changes from direct access to the _attributes dictionary to a copy. This means that the following will raise AssertionError as of this PR, but not on master:

orig_value = my_table.heading.attributes['my_attr']
my_table.heading.attributes['my_attr'] = "foo"
assert my_table.heading.attributes['my_attr'] == "foo"
assert my_table.heading.attributes['my_attr'] != orig_value

ethho added a commit that referenced this pull request Sep 12, 2024
@ethho
Copy link
Contributor

ethho commented Sep 12, 2024

Moving development to #1180, which merges master and makes tests compatible with the new pytest framework.

@ethho ethho closed this Sep 12, 2024
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.

Hidden Attributes
3 participants