Skip to content

Commit

Permalink
ignore mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Sep 24, 2023
1 parent 8c28469 commit 82f57cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion qcodes/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ def _get_version() -> str:

import versioningit

root_module = __loader__.name.split(".")[0]
# https://github.com/python/mypy/issues/4182
root_module = __loader__.name.split(".")[0] # type: ignore[name-defined]

module_path = files(root_module)
if isinstance(module_path, Path):
Expand Down
4 changes: 3 additions & 1 deletion qcodes/configuration/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"required": []
}

_PARENT_MODULE = ".".join(__loader__.name.split(".")[:-1])
# https://github.com/python/mypy/issues/4182
_PARENT_MODULE = ".".join(__loader__.name.split(".")[:-1]) # type: ignore[name-defined]


class Config:
"""
Expand Down
3 changes: 2 additions & 1 deletion qcodes/monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ def main() -> None:

# If this file is run, create a simple webserver that serves a simple
# website that can be used to view monitored parameters.
parent_module = ".".join(__loader__.name.split(".")[:-1])
# # https://github.com/python/mypy/issues/4182
parent_module = ".".join(__loader__.name.split(".")[:-1]) # type: ignore[name-defined]

Check notice on line 271 in qcodes/monitor/monitor.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

qcodes/monitor/monitor.py#L271

Line too long (91/88)

Check warning on line 271 in qcodes/monitor/monitor.py

View check run for this annotation

Codecov / codecov/patch

qcodes/monitor/monitor.py#L271

Added line #L271 was not covered by tests

static_dir = files(parent_module).joinpath("dist")

Check warning on line 273 in qcodes/monitor/monitor.py

View check run for this annotation

Codecov / codecov/patch

qcodes/monitor/monitor.py#L273

Added line #L273 was not covered by tests
try:
Expand Down

0 comments on commit 82f57cf

Please sign in to comment.