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

Avoid class attributes #43

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Avoid class attributes #43

merged 1 commit into from
Jan 15, 2024

Conversation

jwallwork23
Copy link
Member

Closes #23.

Class attributes are effectively global for all instances of the class in question. They can cause nasty bugs if you have several instances of the same class. This PR removes some that were introduced to the Monge-Ampere mover.

The PR also adds some existence checks for the attributes which are converted to object attributes, as well as making some methods private.

@jwallwork23 jwallwork23 added the bug Something isn't working label Jan 14, 2024
@jwallwork23 jwallwork23 added this to the Version 1 milestone Jan 14, 2024
@jwallwork23 jwallwork23 self-assigned this Jan 14, 2024
@jwallwork23 jwallwork23 requested a review from erizmr January 15, 2024 07:31
Copy link
Collaborator

@erizmr erizmr left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

@jwallwork23 jwallwork23 merged commit fee6497 into main Jan 15, 2024
1 check passed
@jwallwork23 jwallwork23 deleted the 23_remove_class_attrs branch January 15, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove class attributes
2 participants