Skip to content

Add stub file for pyparted - #4735

Merged
svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:pyparted-stub
Aug 29, 2026
Merged

svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:pyparted-stub

Conversation

@codefiles

Copy link
Copy Markdown
Contributor

@codefiles
codefiles requested a review from Torxed as a code owner August 28, 2026 12:25
@svartkanin
svartkanin merged commit c110c37 into archlinux:master Aug 29, 2026
11 checks passed
@codefiles
codefiles deleted the pyparted-stub branch August 29, 2026 13:50
@svartkanin

Copy link
Copy Markdown
Collaborator

@codefiles with this change I'm running into pre-commit hook failures

$ git commit -am "test"
...
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

archinstall/lib/models/device.py:10: error: Cannot find implementation or library stub for module named "parted"  [import-not-found]
...

Are we missing the config

mypy_path = "stubs"

that seems to fix it for me?

@codefiles

codefiles commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor Author

The documentation states:

You can point mypy at your type hints either by passing them in via the command line, by using the files or mypy_path config file options, or by adding the location to the MYPYPATH environment variable.

It should be picked up by this files config option:

[tool.mypy]
python_version = "3.14"
files = "."

It works without the mypy_path config option in the CI and locally for me though I don't use pre-commit.

@svartkanin

Copy link
Copy Markdown
Collaborator

Without the mypy_path config setting I'm getting the error above. Could you try it on your end if pre-commits works?

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