diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5f222e0b..6c3200e0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,17 @@ jobs: run: poetry run flake8 - name: Lint with mypy - run: poetry run mypy . + uses: tsuyoshicho/action-mypy@v3 + with: + github_token: ${{ secrets.github_token }} + # Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. + reporter: github-pr-review + # Change reporter level if you need. + # GitHub Status Check won't become failure with warning. + # level: warning + # Change the current directory to run mypy command. + # mypy command reads setup.cfg or other settings file in this path. + # workdir: . - name: Print python versions run: | diff --git a/libvcs/_internal/run.py b/libvcs/_internal/run.py index be0248d7..b83280ba 100644 --- a/libvcs/_internal/run.py +++ b/libvcs/_internal/run.py @@ -178,7 +178,7 @@ def run( shell: bool = False, cwd: Optional[StrOrBytesPath] = None, env: Optional[_ENV] = None, - universal_newlines: bool = False, + universal_newlines: Optional[bool] = None, startupinfo: Optional[Any] = None, creationflags: int = 0, restore_signals: bool = True, @@ -262,7 +262,7 @@ def progress_cb(output, timestamp): umask=umask, ) - all_output: list[str] = [] + all_output = [] code = None line = None while code is None: @@ -270,7 +270,7 @@ def progress_cb(output, timestamp): # output = console_to_str(proc.stdout.readline()) # all_output.append(output) - if callback and callable(callback) and proc.stderr is not None: + if callback and callable(callback): line = console_to_str(proc.stderr.read(128)) if line: callback(output=line, timestamp=datetime.datetime.now())