Skip to content

Conversation

@Thijss
Copy link
Member

@Thijss Thijss commented Jun 10, 2025

Seems related to a numpy release. In any case, these errors have been showing up recently:

On python 3.12, mypy thinks it's fine, but on python 3.11 these show up..

src/power_grid_model_ds/_core/model/arrays/base/_modify.py:15: error: Unsupported right operand type for in ("tuple[str, ...] | None")  [operator]
src/power_grid_model_ds/_core/model/arrays/base/_modify.py:53: error: Unsupported right operand type for in ("tuple[str, ...] | None")  [operator]
src/power_grid_model_ds/_core/model/arrays/base/_filters.py:23: error: Argument 1 to "set" has incompatible type "tuple[str, ...] | None"; expected "Iterable[str]"  [arg-type]
src/power_grid_model_ds/_core/model/arrays/base/_filters.py:23: error: Argument 1 to "set" has incompatible type "tuple[str, ...] | None"; expected "Iterable[Any | None]"  [arg-type]
src/power_grid_model_ds/_core/model/arrays/base/_build.py:28: error: Argument 1 to "_check_missing_columns" has incompatible type "tuple[str, ...] | None"; expected "tuple[Any, ...]"  [arg-type]
src/power_grid_model_ds/_core/model/arrays/base/_build.py:34: error: Argument 1 to "_check_missing_columns" has incompatible type "tuple[str, ...] | None"; expected "tuple[Any, ...]"  [arg-type]
src/power_grid_model_ds/_core/model/arrays/base/_build.py:67: error: Argument 1 to "empty" has incompatible type "dtype[Any]"; expected "type"  [arg-type]
src/power_grid_model_ds/_core/model/arrays/base/_build.py:67: note: Error code "arg-type" not covered by "type: ignore" comment
src/power_grid_model_ds/_core/model/arrays/base/_build.py:90: error: Argument 1 to "set" has incompatible type "tuple[str, ...] | None"; expected "Iterable[str]"  [arg-type]
src/power_grid_model_ds/_core/model/arrays/base/_build.py:91: error: Argument 1 to "set" has incompatible type "tuple[str, ...] | None"; expected "Iterable[str]"  [arg-type]

@sonarqubecloud
Copy link

@Thijss Thijss marked this pull request as ready for review June 16, 2025 08:03
@Thijss Thijss merged commit 00698d5 into main Jun 16, 2025
19 checks passed
@Thijss Thijss deleted the fix/numpy2.3python3.11-typing-issue branch June 16, 2025 08:03
Thijss added a commit that referenced this pull request Jun 16, 2025
* move comments

Signed-off-by: Thijs Baaijen <[email protected]>

* enable test pypi

Signed-off-by: Thijs Baaijen <[email protected]>

* Fix typing issue for numpy 2.3 and python 3.11 (#70)

Signed-off-by: Thijs Baaijen <[email protected]>

---------

Signed-off-by: Thijs Baaijen <[email protected]>
Thijss added a commit that referenced this pull request Jun 16, 2025
* homogenize github actions workflows + use trusted publisher

Signed-off-by: Martijn Govers <[email protected]>

* always release for testing purposes

Signed-off-by: Martijn Govers <[email protected]>

* fix syntax

Signed-off-by: Martijn Govers <[email protected]>

* fix typo

Signed-off-by: Martijn Govers <[email protected]>

* revert test changes

Signed-off-by: Martijn Govers <[email protected]>

* Update .github/workflows/build-test-release.yml

Signed-off-by: Martijn Govers <[email protected]>

Co-authored-by: Thijs Baaijen <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>

* fix ci-passed cfr. PowerGridModel/power-grid-model#1015

Signed-off-by: Martijn Govers <[email protected]>

* Feat/test new pypi (#69)

* move comments

Signed-off-by: Thijs Baaijen <[email protected]>

* enable test pypi

Signed-off-by: Thijs Baaijen <[email protected]>

* Fix typing issue for numpy 2.3 and python 3.11 (#70)

Signed-off-by: Thijs Baaijen <[email protected]>

---------

Signed-off-by: Thijs Baaijen <[email protected]>

---------

Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Martijn Govers <[email protected]>
Signed-off-by: Thijs Baaijen <[email protected]>
Co-authored-by: Thijs Baaijen <[email protected]>
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.

3 participants