Skip to content

feat: mypy 1.16#222

Draft
kerberizer wants to merge 1 commit intomainfrom
mypy-1.16
Draft

feat: mypy 1.16#222
kerberizer wants to merge 1 commit intomainfrom
mypy-1.16

Conversation

@kerberizer
Copy link
Copy Markdown
Member

@kerberizer kerberizer commented Jul 11, 2025

As discussed, we have some problems with mypy 1.16, while 1.15 works fine. The changes in 1.16 are documented here. The error messages are here. No need to hurry with this, but would be helpful to have it fixed nonetheless.

  mypy: commands[0]> mypy src tests
  src/ramanchada2/io/experimental/read_txt.py:50: error: Value of type "tuple[str, ...] | None" is not indexable  [index]
  src/ramanchada2/io/experimental/read_txt.py:51: error: Value of type "tuple[str, ...] | None" is not indexable  [index]
  src/ramanchada2/spectrum/spectrum.py:38: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[floating[Any]]]", variable has type "ndarray[tuple[int, ...], dtype[float64]]")  [assignment]
  src/ramanchada2/spectrum/spectrum.py:138: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[float64]]", variable has type "None")  [assignment]
  src/ramanchada2/spectrum/spectrum.py:139: error: "None" has no attribute "flags"  [attr-defined]
  src/ramanchada2/spectrum/spectrum.py:157: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[float64]]", variable has type "None")  [assignment]
  src/ramanchada2/spectrum/spectrum.py:158: error: "None" has no attribute "flags"  [attr-defined]
  src/ramanchada2/spectrum/calibration/scale_xaxis.py:56: error: Incompatible types in assignment (expression has type "float", variable has type "ndarray[tuple[int, ...], dtype[float64]]")  [assignment]
  Found 8 errors in 3 files (checked 160 source files)

@kerberizer kerberizer added the bug Something isn't working label Jul 11, 2025
@kerberizer kerberizer marked this pull request as draft October 23, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants