Skip to content

Add scikit-build-core#174

Merged
hauntsaninja merged 1 commit intohauntsaninja:masterfrom
henryiii:henryiii/chore/addskbc
May 23, 2025
Merged

Add scikit-build-core#174
hauntsaninja merged 1 commit intohauntsaninja:masterfrom
henryiii:henryiii/chore/addskbc

Conversation

@henryiii
Copy link
Copy Markdown
Contributor

@henryiii henryiii commented May 23, 2025

I picked bad timing for this, as it looks like the next version of mypy has issues with it:

old
> /tmp/mypy_primer/mypy_old/venv/bin/mypy src tests noxfile.py --python-executable=/tmp/mypy_primer/projects/_scikit-build-core_venv/bin/python --warn-unused-ignores --warn-redundant-casts --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit=-1 (27.8s)
	Success: no issues found in 165 source files
----------

new
> /tmp/mypy_primer/mypy_new/venv/bin/mypy src tests noxfile.py --python-executable=/tmp/mypy_primer/projects/_scikit-build-core_venv/bin/python --warn-unused-ignores --warn-redundant-casts --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit=-1 (27.9s)
	src/scikit_build_core/settings/sources.py:498: error: "DataclassInstance" not callable  [operator]
	src/scikit_build_core/settings/sources.py:587: error: Argument 1 to "convert_target" of "SourceChain" has incompatible type "Union[Type[DataclassInstance], DataclassInstance]"; expected "Type[DataclassInstance]"  [arg-type]
	src/scikit_build_core/settings/documentation.py:88: error: Unused "type: ignore" comment  [unused-ignore]
	src/scikit_build_core/settings/documentation.py:105: error: Argument 1 to "mk_docs" has incompatible type "Union[Type[DataclassInstance], DataclassInstance]"; expected "Type[object]"  [arg-type]
	src/scikit_build_core/settings/documentation.py:111: error: Argument 1 to "mk_docs" has incompatible type "Union[Type[DataclassInstance], DataclassInstance]"; expected "Type[object]"  [arg-type]
	src/scikit_build_core/file_api/reply.py:98: error: Argument 2 to "make_class" of "Converter" has incompatible type "Union[Type[DataclassInstance], DataclassInstance]"; expected "Type[DataclassInstance]"  [arg-type]
	src/scikit_build_core/settings/json_schema.py:117: error: Argument 1 to "to_json_schema" has incompatible type "Union[DataclassInstance, Type[DataclassInstance]]"; expected "Type[Any]"  [arg-type]
	Found 7 errors in 4 files (checked 165 source files)

Not sure what the policy is for projects that were error free in the last released version, I can wait until after release if that's better. Looks like it's not far away: python/mypy#18739.

Edit: I worked around most of the issues.

Signed-off-by: Henry Schreiner <[email protected]>
henryiii added a commit to scikit-build/scikit-build-core that referenced this pull request May 23, 2025
This types better on 1.16 (will need a few more adjustments when it
comes out, but this is closer). See
hauntsaninja/mypy_primer#174 and
python/mypy#19139.

Signed-off-by: Henry Schreiner <[email protected]>
Copy link
Copy Markdown
Owner

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine for it to not pass cleanly, the diff logic will handle that!

@hauntsaninja hauntsaninja merged commit 951b4d8 into hauntsaninja:master May 23, 2025
2 checks passed
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.

2 participants