-
Notifications
You must be signed in to change notification settings - Fork 0
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
mypy fixups #4
mypy fixups #4
Conversation
@@ -348,8 +348,8 @@ def _register( | |||
""" | |||
with self.lock: | |||
# Register each trial (one-by-one) | |||
contexts: List[pd.Series] | List[None] = _to_context(context) or [ | |||
None for _ in scores | |||
contexts: Union[List[pd.Series], List[None]] = _to_context(context) or [ |
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.
need to support older versions of python
@@ -361,8 +361,9 @@ def _register( | |||
) | |||
|
|||
# Retrieve previously generated TrialInfo (returned by .ask()) or create new TrialInfo instance | |||
matching: pd.Series[bool] |
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.
consistent typing info across branches
@@ -182,7 +182,7 @@ def test_create_optimizer_with_factory_method( | |||
|
|||
assert optimizer.parameter_space is not None | |||
|
|||
suggestion, context = optimizer.suggest() | |||
suggestion, _ = optimizer.suggest() |
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.
unused variable
For future reference the following will run these tests: make check Internally the runs the following: make pycodestyle
make pydocstyle
make pylint
make mypy It also runs them inside an appropriate make CONDA_ENV_NAME=mlos-3.8 mypy You can run them all individually as well that way. |
No description provided.