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

mypy fixups #4

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

bpkroth
Copy link

@bpkroth bpkroth commented May 16, 2024

No description provided.

@@ -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 [
Copy link
Author

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]
Copy link
Author

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()
Copy link
Author

Choose a reason for hiding this comment

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

unused variable

@jsfreischuetz jsfreischuetz merged commit 9d5f973 into jsfreischuetz:main May 16, 2024
@bpkroth
Copy link
Author

bpkroth commented May 16, 2024

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 conda env. You can override which one like so:

make CONDA_ENV_NAME=mlos-3.8 mypy

You can run them all individually as well that way.

@bpkroth bpkroth deleted the jsfreischuetz-main branch May 16, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants