fast-dev-cli 0.24.2__tar.gz → 0.24.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fast_dev_cli-0.24.2 → fast_dev_cli-0.24.3}/PKG-INFO +1 -1
- fast_dev_cli-0.24.3/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.24.2 → fast_dev_cli-0.24.3}/fast_dev_cli/cli.py +16 -1
- {fast_dev_cli-0.24.2 → fast_dev_cli-0.24.3}/pyproject.toml +1 -1
- fast_dev_cli-0.24.2/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.24.2 → fast_dev_cli-0.24.3}/LICENSE +0 -0
- {fast_dev_cli-0.24.2 → fast_dev_cli-0.24.3}/README.md +0 -0
- {fast_dev_cli-0.24.2 → fast_dev_cli-0.24.3}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.24.2 → fast_dev_cli-0.24.3}/fast_dev_cli/py.typed +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.24.3"
|
|
@@ -1229,6 +1229,15 @@ class LintCode(DryRun):
|
|
|
1229
1229
|
prefix = ""
|
|
1230
1230
|
should_run_by_tool = with_prefix
|
|
1231
1231
|
requires_mypy = any(tool.startswith("mypy") for tool in tools)
|
|
1232
|
+
global_mypy = False
|
|
1233
|
+
if requires_mypy and Path.home().joinpath(".local/bin/mypy").exists():
|
|
1234
|
+
global_mypy = True
|
|
1235
|
+
mypy_opt = "--python-executable=.venv/bin/python"
|
|
1236
|
+
for i, t in enumerate(tools):
|
|
1237
|
+
if t.startswith("mypy"):
|
|
1238
|
+
if mypy_opt not in t:
|
|
1239
|
+
tools[i] = t + " " + mypy_opt
|
|
1240
|
+
break
|
|
1232
1241
|
if requires_mypy and not should_run_by_tool:
|
|
1233
1242
|
if is_venv() and Path(sys.argv[0]).parent != Path.home().joinpath(
|
|
1234
1243
|
".local/bin"
|
|
@@ -1245,6 +1254,8 @@ class LintCode(DryRun):
|
|
|
1245
1254
|
"You may need to run the following command"
|
|
1246
1255
|
f" to install ruff:\n\n {command}\n"
|
|
1247
1256
|
)
|
|
1257
|
+
elif global_mypy:
|
|
1258
|
+
should_run_by_tool = True
|
|
1248
1259
|
elif cls.missing_mypy_exec():
|
|
1249
1260
|
should_run_by_tool = True
|
|
1250
1261
|
if check_call('python -c "import fast_dev_cli"'):
|
|
@@ -1280,7 +1291,11 @@ class LintCode(DryRun):
|
|
|
1280
1291
|
tool
|
|
1281
1292
|
# `ruff <command>` get the same result with `pdm run ruff <command>`.
|
|
1282
1293
|
# Other tools should run inside the selected environment.
|
|
1283
|
-
if
|
|
1294
|
+
if (
|
|
1295
|
+
ruff_exists
|
|
1296
|
+
and tool.startswith("ruff")
|
|
1297
|
+
or (global_mypy and tool.startswith("mypy"))
|
|
1298
|
+
)
|
|
1284
1299
|
else prefix + tool
|
|
1285
1300
|
)
|
|
1286
1301
|
+ f" {paths}"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.24.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|