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

try/except instead of requiring version kwarg #305

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

swelborn
Copy link
Collaborator

avoid using version kwarg

@swelborn swelborn self-assigned this Nov 30, 2023

raise FileNotFoundError(
"No file with those parameters can be found for any version."
)
Copy link
Member

Choose a reason for hiding this comment

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

Looks good. You could also avoid the if block by having a list of the functions and using the version as the index ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

how about new version?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, although I was thinking of a list, but a dict works too.

@swelborn swelborn merged commit f4eb7d2 into OpenChemistry:master Nov 30, 2023
10 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