-
Notifications
You must be signed in to change notification settings - Fork 2
error msg if version is missing #35
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
|
Not so sure about the test 🤷♂️ |
| _main(today, policy_file, environment_paths) | ||
|
|
||
|
|
||
| def _main(today, policy_file, environment_paths): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might need to clean this up a bit: currently _main would call sys.exit, which is not great for testing. It also should take the contents of the files instead of file handles / paths, which avoids the need to do I/O in the tests.
Additionally, _main is not really a descriptive name. How about something like validate_environment instead?
| assert_spec_has_version(environments) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be done at the same time as applying exclude? I don't have the time to come up with something better right now, but assuming this isn't too urgent I will spend some time on this later this week.
|
also, does this close #28? |
|
No worries! I meant to work on this but haven't so I am happy you did! |
Adds a clearer error message a package is missing a version in the environment file (and is not in
exclude. Currently raisesAttributeError: 'NoneType' object has no attribute '_version'