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

github workflows updated, small tests fixes #13

Merged
merged 1 commit into from
Jan 21, 2024
Merged

Conversation

bgalek
Copy link
Collaborator

@bgalek bgalek commented Jan 18, 2024

This branch incorporates matrix testing

@bgalek bgalek force-pushed the OOP_update branch 2 times, most recently from e62fec9 to d653c2e Compare January 18, 2024 08:14
instance = super(Date, cls).__new__(cls)
cls._instances[string] = instance
return instance
# If not, create a new instance
Copy link
Owner

Choose a reason for hiding this comment

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

I understand your intention here. However, even if else is redundant here (since we have return above), it makes the code a little bit more readable in my opinion. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, It's not matter of live/death - yet I really like the "fast return" pattern, there are a lot of examples https://realpython.com/python-return-statement/#using-return-with-conditionals :)

_tests/test_utils.py Show resolved Hide resolved
@DeutscheGabanna DeutscheGabanna merged commit 1ac5638 into OOP Jan 21, 2024
4 of 5 checks passed
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.

2 participants