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

add types to _option_set.py #249

Merged
merged 7 commits into from
Sep 8, 2019

Conversation

cs01
Copy link
Contributor

@cs01 cs01 commented Sep 6, 2019

Ran monkeytype apply nox._option_set then added additional types as needed.

nox/_options.py Outdated
global_config = parsed_args
module = load_nox_module(global_config)
manifest = discover_manifest(module, global_config)
filtered_manifest = filter_manifest(manifest, global_config)
if isinstance(filtered_manifest, int): # pragma: no cover
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is never hit, we should just remove the branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mypy complains that it might be an int, so it's there as a type refinement since filter_manifest can return an int. I can look into adding a test case to cover this line.

@theacodes
Copy link
Collaborator

theacodes commented Sep 6, 2019 via email

@theacodes
Copy link
Collaborator

Thank you, @cs01!

@theacodes theacodes merged commit e9baf4f into wntrblm:master Sep 8, 2019
@cs01 cs01 deleted the cs01/add-types-_option_set.py branch September 8, 2019 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants