fast-dev-cli 0.18.5__tar.gz → 0.18.6__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.18.5 → fast_dev_cli-0.18.6}/PKG-INFO +1 -1
- fast_dev_cli-0.18.6/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/fast_dev_cli/cli.py +17 -3
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/pyproject.toml +1 -1
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_lint.py +1 -1
- fast_dev_cli-0.18.5/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/LICENSE +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/README.md +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/fast_dev_cli/py.typed +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/pdm_build.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/scripts/check.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/scripts/deps.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/scripts/format.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/scripts/test.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/__init__.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/assets/uv-tx.lock +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/assets/uv.lock +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/conftest.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_bump.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_deps.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_exec.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_fast_test.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_functions.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_help.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_poetry_version_plugin.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_pypi.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_runserver.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_sync.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_tag.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_upgrade.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_upload.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/test_version.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.18.6}/tests/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.18.6"
|
|
@@ -109,6 +109,8 @@ def is_windows() -> bool:
|
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
def yellow_warn(msg: str) -> None:
|
|
112
|
+
if is_windows() and (encoding := sys.stdout.encoding) != "utf-8":
|
|
113
|
+
msg = msg.encode(encoding, errors="ignore").decode(encoding)
|
|
112
114
|
secho(msg, fg="yellow")
|
|
113
115
|
|
|
114
116
|
|
|
@@ -219,7 +221,7 @@ def exit_if_run_failed(
|
|
|
219
221
|
|
|
220
222
|
|
|
221
223
|
def _parse_version(line: str, pattern: re.Pattern[str]) -> str:
|
|
222
|
-
return pattern.sub("", line).split("#")[0].strip(" '\"")
|
|
224
|
+
return pattern.sub("", line).split("#")[0].strip().strip(" '\"")
|
|
223
225
|
|
|
224
226
|
|
|
225
227
|
def read_version_from_file(
|
|
@@ -1003,7 +1005,11 @@ class LintCode(DryRun):
|
|
|
1003
1005
|
|
|
1004
1006
|
@staticmethod
|
|
1005
1007
|
def check_lint_tool_installed() -> bool:
|
|
1006
|
-
|
|
1008
|
+
try:
|
|
1009
|
+
return check_call("ruff --version")
|
|
1010
|
+
except FileNotFoundError:
|
|
1011
|
+
# Windows may raise FileNotFoundError when ruff not installed
|
|
1012
|
+
return False
|
|
1007
1013
|
|
|
1008
1014
|
@staticmethod
|
|
1009
1015
|
def missing_mypy_exec() -> bool:
|
|
@@ -1070,7 +1076,7 @@ class LintCode(DryRun):
|
|
|
1070
1076
|
if not should_run_by_tool:
|
|
1071
1077
|
if is_venv() and Path(sys.argv[0]).parent != Path.home().joinpath(
|
|
1072
1078
|
".local/bin"
|
|
1073
|
-
):
|
|
1079
|
+
): # Virtual environment activated and fast-dev-cli is installed in it
|
|
1074
1080
|
if not ruff_exists:
|
|
1075
1081
|
should_run_by_tool = True
|
|
1076
1082
|
command = "pipx install ruff"
|
|
@@ -1089,6 +1095,14 @@ class LintCode(DryRun):
|
|
|
1089
1095
|
"You may need to run the following command"
|
|
1090
1096
|
f" to install lint tools:\n\n {command}\n"
|
|
1091
1097
|
)
|
|
1098
|
+
elif tool == ToolOption.default:
|
|
1099
|
+
root = Project.get_work_dir(allow_cwd=True)
|
|
1100
|
+
if py := shutil.which("python"):
|
|
1101
|
+
try:
|
|
1102
|
+
Path(py).relative_to(root)
|
|
1103
|
+
except ValueError:
|
|
1104
|
+
# Virtual environment not activated
|
|
1105
|
+
should_run_by_tool = True
|
|
1092
1106
|
else:
|
|
1093
1107
|
should_run_by_tool = True
|
|
1094
1108
|
if should_run_by_tool and tool:
|
|
@@ -183,7 +183,7 @@ def test_dmypy_run(monkeypatch):
|
|
|
183
183
|
def test_lint_with_prefix(mocker):
|
|
184
184
|
mocker.patch("fast_dev_cli.cli.is_venv", return_value=False)
|
|
185
185
|
with capture_stdout() as stream:
|
|
186
|
-
make_style(["."], check_only=False, dry=True)
|
|
186
|
+
make_style(["."], check_only=False, dry=True, prefix=True)
|
|
187
187
|
assert "pdm run" in stream.getvalue()
|
|
188
188
|
|
|
189
189
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.18.5"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|