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

Pass bool instead of int values to pytest.mark.skipif #1398

Merged

Conversation

obi1kenobi
Copy link
Contributor

Resolves the following type errors that mypy points out:

arviz/tests/base_tests/test_utils_numba.py:15: error: Argument 1 to "__call__" of "_SkipifMarkDecorator" has incompatible type "int"; expected "Union[str, bool]"  [arg-type]
arviz/tests/base_tests/test_plot_utils.py:203: error: Argument 1 to "__call__" of "_SkipifMarkDecorator" has incompatible type "int"; expected "Union[str, bool]"  [arg-type]
arviz/tests/base_tests/test_plot_utils.py:281: error: Argument 1 to "__call__" of "_SkipifMarkDecorator" has incompatible type "int"; expected "Union[str, bool]"  [arg-type]
arviz/tests/base_tests/test_diagnostics_numba.py:17: error: Argument 1 to "__call__" of "_SkipifMarkDecorator" has incompatible type "int"; expected "Union[str, bool]"  [arg-type]
arviz/tests/base_tests/test_stats_numba.py:18: error: Argument 1 to "__call__" of "_SkipifMarkDecorator" has incompatible type "int"; expected "Union[str, bool]"  [arg-type]

@@ -23,6 +23,10 @@
from ..helpers import running_on_ci


# Check if Bokeh is installed
bokeh_installed = importlib.util.find_spec("bokeh") is not None # pylint: disable=invalid-name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just moved this to the top (it used to be in the middle of the file) and then made all the skipif decorators in this file use the same logical expression as the one on line 310. I chose the expression from that line since it seemed the most obvious and explicit to me, but I'm happy to switch to a different one if the maintainers have a different preference.

@ahartikainen ahartikainen merged commit e29149c into arviz-devs:master Sep 28, 2020
@ahartikainen
Copy link
Contributor

Thanks for the PR

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.

None yet

2 participants