Skip to content

Commit

Permalink
Merge pull request #5433 from QCoDeS/dependabot/pip/mypy-approx-eq-1.6.0
Browse files Browse the repository at this point in the history
Update mypy requirement from ~=1.5.0 to ~=1.6.0
  • Loading branch information
jenshnielsen authored Oct 11, 2023
2 parents 9334be5 + 1468a0c commit 039a1f8
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 25 deletions.
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,25 +179,19 @@ disallow_untyped_defs = false
disallow_incomplete_defs = false

# these are packages that we import
# but either don't have stubs or we
# dont have them installed.
# but don't have installed by default
# ruamel https://github.com/python/mypy/issues/12664
[[tool.mypy.overrides]]
module = [
"clr",
"deepdiff",
"gclib",
"ipywidgets",
"h5netcdf",
"mcl_RF_Switch_Controller64",
"mcl_RF_Switch_Controller_NET45",
"opencensus.ext.azure.*",
"pywinusb.*",
"ruamel",
"spyder.utils.site",
"spyder_kernels.customize",
"System.IO",
"uncertainties",
"wrapt",
]
ignore_missing_imports = true

Expand Down
2 changes: 1 addition & 1 deletion qcodes/dataset/data_set_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def _add_metadata_to_netcdf_if_nc_exported(self, tag: str, data: Any) -> None:
export_paths = self.export_info.export_paths
nc_file = export_paths.get(DataExportType.NETCDF.value, None)
if nc_file is not None:
import h5netcdf
import h5netcdf # type: ignore[import-untyped]

try:
with h5netcdf.File(
Expand Down
2 changes: 1 addition & 1 deletion qcodes/dataset/sqlite/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from contextlib import contextmanager
from typing import Any

import wrapt
import wrapt # type: ignore[import-untyped]

from qcodes.utils import DelayedKeyboardInterrupt

Expand Down
2 changes: 1 addition & 1 deletion qcodes/interactive_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import TYPE_CHECKING, Any, Literal

from IPython.display import clear_output, display
from ipywidgets import (
from ipywidgets import ( # type: ignore[import-untyped]
HTML,
Box,
Button,
Expand Down
8 changes: 6 additions & 2 deletions qcodes/logger/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
from typing import TYPE_CHECKING, Optional, Union

if TYPE_CHECKING:
from opencensus.ext.azure.common.protocol import Envelope
from opencensus.ext.azure.log_exporter import AzureLogHandler
from opencensus.ext.azure.common.protocol import ( # type: ignore[import-untyped]
Envelope,
)
from opencensus.ext.azure.log_exporter import ( # type: ignore[import-untyped]
AzureLogHandler,
)

import qcodes as qc
from qcodes.utils import (
Expand Down
2 changes: 1 addition & 1 deletion qcodes/tests/dataset/test_converters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from deepdiff import DeepDiff # pyright: ignore[reportMissingTypeStubs]
from deepdiff import DeepDiff # type: ignore[import-untyped]

from qcodes.dataset.descriptions.rundescriber import RunDescriber
from qcodes.dataset.descriptions.versioning.converters import (
Expand Down
8 changes: 1 addition & 7 deletions qcodes/tests/helpers/test_json_encoder.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import json
import warnings
from collections import OrderedDict, UserDict

import hypothesis.strategies as hst
import numpy as np
import pytest
import uncertainties # type: ignore[import-untyped]
from hypothesis import given

with warnings.catch_warnings():
# this context manager can be removed when uncertainties
# no longer triggers deprecation warnings
warnings.simplefilter("ignore", category=DeprecationWarning)
import uncertainties

from qcodes.utils import NumpyJSONEncoder
from qcodes.utils.types import numpy_complex, numpy_floats, numpy_ints

Expand Down
8 changes: 7 additions & 1 deletion qcodes/tests/test_interactive_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
import ipykernel.ipkernel # noqa F401
import matplotlib
import pytest
from ipywidgets import HTML, Button, GridspecLayout, Tab, Textarea
from ipywidgets import ( # type: ignore[import-untyped]
HTML,
Button,
GridspecLayout,
Tab,
Textarea,
)

from qcodes import interactive_widget

Expand Down
2 changes: 1 addition & 1 deletion qcodes/utils/deprecate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from contextlib import contextmanager
from typing import Any, Callable, Optional, cast

import wrapt
import wrapt # type: ignore[import-untyped]


class QCoDeSDeprecationWarning(RuntimeWarning):
Expand Down
2 changes: 1 addition & 1 deletion qcodes/utils/json_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def default(self, obj: Any) -> Any:
* Other objects which cannot be serialized get converted to their
string representation (using the ``str`` function).
"""
import uncertainties
import uncertainties # type: ignore[import-untyped]

if isinstance(obj, np.generic) and not isinstance(obj, np.complexfloating):
# for numpy scalars
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ matplotlib-inline==0.1.6
mistune~=3.0.1
msal~=1.24.0
msal-extensions~=1.0.0
mypy~=1.5.0
mypy~=1.6.0
mypy-extensions~=1.0.0
nbclient==0.8.0
nbconvert~=7.9.0
Expand Down

0 comments on commit 039a1f8

Please sign in to comment.