Skip to content

Commit

Permalink
Fix typing issue in py37, py38
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Feb 3, 2022
1 parent 4bd6e7a commit f9a5dbd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
6 changes: 2 additions & 4 deletions awscliv2/interactive_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def __init__(self, command: Sequence[str], encoding: str = ENCODING) -> None:
self.finished = True
self.encoding = encoding

# pylint: disable=unsubscriptable-object
def writeall(self, process: Popen[bytes], stdout: TextIO) -> None:
def writeall(self, process: Popen, stdout: TextIO) -> None: # type: ignore
"""
Read output from `process` to `stdout` stream.
Expand All @@ -46,8 +45,7 @@ def writeall(self, process: Popen[bytes], stdout: TextIO) -> None:
stdout.write(output_data.decode(self.encoding))
stdout.flush()

# pylint: disable=unsubscriptable-object
def readall(self, process: Popen[bytes], stdin: TextIO) -> None:
def readall(self, process: Popen, stdin: TextIO) -> None: # type: ignore
"""
Write input from `stdin` stream to `process`.
Expand Down
10 changes: 5 additions & 5 deletions docs/awscliv2/interactive_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Wrapper for subrocess.Popen with interactive input support.

### InteractiveProcess().readall

[[find in source code]](https://github.com/vemel/awscliv2/blob/main/awscliv2/interactive_process.py#L50)
[[find in source code]](https://github.com/vemel/awscliv2/blob/main/awscliv2/interactive_process.py#L48)

```python
def readall(process: Popen[bytes], stdin: TextIO) -> None:
def readall(process: Popen, stdin: ignore) -> None:
```

Write input from `stdin` stream to `process`.
Expand All @@ -42,7 +42,7 @@ Write input from `stdin` stream to `process`.

### InteractiveProcess().run

[[find in source code]](https://github.com/vemel/awscliv2/blob/main/awscliv2/interactive_process.py#L74)
[[find in source code]](https://github.com/vemel/awscliv2/blob/main/awscliv2/interactive_process.py#L72)

```python
def run(
Expand All @@ -53,10 +53,10 @@ def run(

### InteractiveProcess().writeall

[[find in source code]](https://github.com/vemel/awscliv2/blob/main/awscliv2/interactive_process.py#L30)
[[find in source code]](https://github.com/vemel/awscliv2/blob/main/awscliv2/interactive_process.py#L29)

```python
def writeall(process: Popen[bytes], stdout: TextIO) -> None:
def writeall(process: Popen, stdout: ignore) -> None:
```

Read output from `process` to `stdout` stream.
Expand Down
10 changes: 5 additions & 5 deletions docs_local/awscliv2/interactive_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Wrapper for subrocess.Popen with interactive input support.

### InteractiveProcess().readall

[[find in source code]](blob/main/awscliv2/interactive_process.py#L50)
[[find in source code]](blob/main/awscliv2/interactive_process.py#L48)

```python
def readall(process: Popen[bytes], stdin: TextIO) -> None:
def readall(process: Popen, stdin: ignore) -> None:
```

Write input from `stdin` stream to `process`.
Expand All @@ -42,7 +42,7 @@ Write input from `stdin` stream to `process`.

### InteractiveProcess().run

[[find in source code]](blob/main/awscliv2/interactive_process.py#L74)
[[find in source code]](blob/main/awscliv2/interactive_process.py#L72)

```python
def run(
Expand All @@ -53,10 +53,10 @@ def run(

### InteractiveProcess().writeall

[[find in source code]](blob/main/awscliv2/interactive_process.py#L30)
[[find in source code]](blob/main/awscliv2/interactive_process.py#L29)

```python
def writeall(process: Popen[bytes], stdout: TextIO) -> None:
def writeall(process: Popen, stdout: ignore) -> None:
```

Read output from `process` to `stdout` stream.
Expand Down

0 comments on commit f9a5dbd

Please sign in to comment.