Skip to content

Commit

Permalink
Go back to mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Feb 12, 2024
1 parent 5aef401 commit 036b259
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ dev = [
"scanspec[plotting]",
"scanspec[service]",
"copier",
"mypy",
"myst-parser",
"pipdeptree",
"pre-commit",
"pydata-sphinx-theme>=0.12",
"pyright",
"pytest",
"pytest-cov",
"ruff",
Expand Down Expand Up @@ -73,8 +73,8 @@ name = "Tom Cobb"
[tool.setuptools_scm]
write_to = "src/scanspec/_version.py"

[tool.pyright]
reportMissingImports = false # Ignore missing stubs in imported modules
[tool.mypy]
ignore_missing_imports = true # Ignore missing stubs in imported modules

[tool.pytest.ini_options]
# Run pytest with all our checkers, and don't spam us with massive tracebacks on error
Expand All @@ -100,19 +100,19 @@ legacy_tox_ini = """
[tox]
skipsdist=True
[testenv:{pre-commit,pyright,pytest,docs}]
[testenv:{pre-commit,mypy,pytest,docs}]
# Don't create a virtualenv for the command, requires tox-direct plugin
direct = True
passenv = *
allowlist_externals =
pytest
pre-commit
pyright
mypy
sphinx-build
sphinx-autobuild
commands =
pytest: pytest --cov=scanspec --cov-report term --cov-report xml:cov.xml {posargs}
pyright: pyright src tests {posargs}
mypy: mypy src tests {posargs}
pre-commit: pre-commit run --all-files {posargs}
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
"""
Expand Down
2 changes: 1 addition & 1 deletion src/scanspec/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def zip_gap(gaps: Sequence[np.ndarray]) -> np.ndarray:

def _merge_frames(
*stack: Frames[Axis],
dict_merge=Callable[[Sequence[AxesPoints[Axis]]], AxesPoints[Axis]],
dict_merge=Callable[[Sequence[AxesPoints[Axis]]], AxesPoints[Axis]], # type: ignore
gap_merge=Callable[[Sequence[np.ndarray]], Optional[np.ndarray]],
) -> Frames[Axis]:
types = {type(fs) for fs in stack}
Expand Down
2 changes: 1 addition & 1 deletion src/scanspec/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def concat(self, other: Spec) -> Concat[Axis]:

def serialize(self) -> Mapping[str, Any]:
"""Serialize the spec to a dictionary."""
return asdict(self)
return asdict(self) # type: ignore

@classmethod
def deserialize(cls, obj):
Expand Down

0 comments on commit 036b259

Please sign in to comment.