diff --git a/pyproject.toml b/pyproject.toml index cc966b9..1d1a24f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,8 +32,8 @@ classifiers = [ "Topic :: Utilities", ] dependencies = [ - "click~=8.3", - "runez~=5.3", + "click<9", + "runez<6", ] dynamic = ["version"] @@ -43,6 +43,9 @@ mgit = "mgit.cli:main" [project.urls] Source = "https://github.com/zsimic/mgit" +[tool.pyright] +pythonVersion = "3.10" +include = ["src"] [tool.ruff] cache-dir = ".tox/.ruff_cache" diff --git a/src/mgit/git.py b/src/mgit/git.py index d0a44a1..d4fcb92 100644 --- a/src/mgit/git.py +++ b/src/mgit/git.py @@ -344,10 +344,8 @@ def run_git_command(self, *args): """ cmd, pretty_args = self._git_command(args) LOG.debug("Running: %s", pretty_args) - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # noqa: S603 + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) # noqa: S603 output, error = proc.communicate() - output = runez.decode(output) - error = runez.decode(error) if proc.returncode == 0: return output, GitRunReport() diff --git a/tests/conftest.py b/tests/conftest.py index 0de2ce2..e5437de 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,5 @@ -from runez.conftest import cli +from runez.conftest import cli, ClickRunner # noqa: F401, fixtures from mgit.cli import main -cli.default_main = main +ClickRunner.default_main = main diff --git a/tox.ini b/tox.ini index 96d75a5..a4c7316 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,12 @@ deps = ruff commands = ruff check ruff format --diff +[testenv:typecheck] +usedevelop = True +deps = pyright + -rtests/requirements.txt +commands = pyright + [testenv:reformat] skip_install = True deps = ruff