Skip to content
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
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ classifiers = [
"Topic :: Utilities",
]
dependencies = [
"click~=8.3",
"runez~=5.3",
"click<9",
"runez<6",
]
dynamic = ["version"]

Expand All @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions src/mgit/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading