Skip to content

Commit 2da63d2

Browse files
authored
Merge pull request #55 from kcroker/maintainance
Maintainance
2 parents 8c6698f + c229a76 commit 2da63d2

3 files changed

Lines changed: 160 additions & 103 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dpsprep = "dpsprep.cli:dpsprep"
3737
[dependency-groups]
3838
dev = [
3939
"click-man (>=0.5.1)",
40-
"mypy (>=1.19)",
40+
"mypy (>=2)",
4141
"pytest (>=9.0.3)",
4242
"ruff (>=0.15)",
4343
"ruff-config-ivasilev @ git+https://github.com/v--/ruff-config-ivasilev.git@v0.15post7",
@@ -53,22 +53,19 @@ build-backend = "uv_build"
5353
[tool.uv]
5454
resolution = "lowest-direct"
5555

56-
# pytest
57-
[tool.pytest.ini_options]
58-
addopts = "--capture tee-sys"
59-
6056
# ruff
6157
[tool.ruff]
6258
extend = ".venv/share/ruff/ruff.ivasilev.toml"
6359

6460
[tool.ruff.lint]
65-
extend-ignore = [
61+
ignore = [
6662
"D1", # undocumented-*
6763
]
6864

6965
# mypy
7066
[tool.mypy]
7167
packages = ["dpsprep"]
68+
strict_bytes = false
7269

7370
[[tool.mypy.overrides]]
7471
module = [

src/dpsprep/options.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,13 @@ class SocrOptionClickType(click.ParamType):
8585
name = 'comma-separated languages'
8686

8787
@override
88-
def convert(self, value: str, param: click.Parameter | None, ctx: click.Context | None) -> JsonObject | None:
88+
def convert(self, value: str | JsonObject | None, param: click.Parameter | None, ctx: click.Context | None) -> JsonObject | None:
89+
if value is None:
90+
return None
91+
92+
if isinstance(value, Mapping):
93+
return value
94+
8995
return dict(languages=value.split(','))
9096

9197

0 commit comments

Comments
 (0)