Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Run type hinting #649

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ ignore_missing_imports = True
[mypy-ld.*]
ignore_missing_imports = True

[mypy-psutil.*]
ignore_missing_imports = True

[mypy-pytest.*]
ignore_missing_imports = True

Expand Down
4 changes: 2 additions & 2 deletions src/e3/anod/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from e3.anod.buildspace import BuildSpace
from e3.anod.sandbox import SandBox
from e3.env import BaseEnv
from e3.os.process import STDOUT_VALUE, DEVNULL_VALUE, PIPE_VALUE
from e3.os.process import DEVNULL_VALUE, PIPE_VALUE

import e3.anod.package
import e3.anod.sandbox
Expand Down Expand Up @@ -544,7 +544,7 @@ def shell(
self,
*command: str,
parse_shebang: bool = True,
output: STDOUT_VALUE | DEVNULL_VALUE | PIPE_VALUE | str | IO | None = None,
output: DEVNULL_VALUE | PIPE_VALUE | str | IO | None = None,
python_executable: None = None,
**kwargs: Any,
) -> e3.os.process.Run:
Expand Down
2 changes: 1 addition & 1 deletion src/e3/os/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def __init__(
self,
cmds: AnyCmdLine,
cwd: str | None = None,
output: STDOUT_VALUE | DEVNULL_VALUE | PIPE_VALUE | str | IO | None = PIPE,
output: DEVNULL_VALUE | PIPE_VALUE | str | IO | None = PIPE,
error: STDOUT_VALUE | DEVNULL_VALUE | PIPE_VALUE | str | IO | None = STDOUT,
input: DEVNULL_VALUE # noqa: A002
| PIPE_VALUE
Expand Down
5 changes: 2 additions & 3 deletions src/e3/vcs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
TextIO,
)
from collections.abc import Iterator
from e3.os.process import Run, STDOUT_VALUE, DEVNULL_VALUE, PIPE_VALUE
from e3.os.process import Run, DEVNULL_VALUE, PIPE_VALUE

Git_Cmd = List[Optional[str]]
GIT_LOG_STREAM_VALUE = Literal[-4]
Expand Down Expand Up @@ -109,8 +109,7 @@ def create(cls, repo_path: str, initial_content_path: str | None = None) -> str:
def git_cmd(
self,
cmd: Git_Cmd,
output: STDOUT_VALUE
| DEVNULL_VALUE
output: DEVNULL_VALUE
| PIPE_VALUE
| GIT_LOG_STREAM_VALUE
| str
Expand Down