fast-dev-cli 0.25.10__tar.gz → 0.26.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fast-dev-cli
3
- Version: 0.25.10
3
+ Version: 0.26.1
4
4
  Summary: Python project development tool.
5
5
  Author-Email: Waket Zheng <waketzheng@gmail.com>>
6
6
  Classifier: Development Status :: 4 - Beta
@@ -0,0 +1 @@
1
+ __version__ = "0.26.1"
@@ -1159,7 +1159,7 @@ class GitTag(DryRun):
1159
1159
 
1160
1160
  def mark_tag(self) -> bool:
1161
1161
  if not re.search(r"working (tree|directory) clean", self.git_status) and (
1162
- "无文件要提交,干净的工作区" not in self.git_status
1162
+ "无文件要提交," not in self.git_status
1163
1163
  ):
1164
1164
  run_and_echo("git status")
1165
1165
  echo("ERROR: Please run git commit to make sure working tree is clean!")
@@ -1276,7 +1276,7 @@ class LintCode(DryRun):
1276
1276
  prettier = f"{npx} prettier"
1277
1277
  elif is_windows() and abspath:
1278
1278
  # If prettier is installed by `npm i -g`
1279
- prettier = Path(abspath).name # prettier.CMD
1279
+ prettier = Path(abspath).name.removesuffix(".exe") # prettier.CMD
1280
1280
  return f"{prettier} -w {quoted_paths}"
1281
1281
  ruff_rules = ["I", "B"]
1282
1282
  if ruff_check_sim and not load_bool("FASTDEVCLI_NO_SIM"):
@@ -2251,9 +2251,29 @@ def pypi(
2251
2251
  ):
2252
2252
  yellow_warn(f"{p.name!r} not found!")
2253
2253
  return
2254
+ if not verbose:
2255
+ verbose = dry and not quiet
2254
2256
  UvPypi(p, dry, verbose, quiet, slim, reverse).run()
2255
2257
 
2256
2258
 
2259
+ @cli.command()
2260
+ def reverse(
2261
+ file: Annotated[str | None, typer.Argument()] = None,
2262
+ dry: bool = DryOption,
2263
+ verbose: bool = False,
2264
+ quiet: bool = False,
2265
+ ) -> None:
2266
+ """Change registry of uv.lock to be pypi.org"""
2267
+ if not (p := Path(_ensure_str(file) or "uv.lock")).exists() and not (
2268
+ (p := Project.get_work_dir() / p.name).exists()
2269
+ ):
2270
+ yellow_warn(f"{p.name!r} not found!")
2271
+ return
2272
+ if not verbose:
2273
+ verbose = dry and not quiet
2274
+ UvPypi(p, dry, verbose, quiet, reverse=True).run()
2275
+
2276
+
2257
2277
  class SuffixParser:
2258
2278
  usually = ("py", "md", "json", "txt", "proto", "toml")
2259
2279
 
@@ -29,7 +29,7 @@ dependencies = [
29
29
  "typer>=0.24.0,<1",
30
30
  "tomli >=2.0.1,<3; python_version < '3.11'",
31
31
  ]
32
- version = "0.25.10"
32
+ version = "0.26.1"
33
33
 
34
34
  [project.urls]
35
35
  Homepage = "https://github.com/waketzheng/fast-dev-cli"
@@ -1 +0,0 @@
1
- __version__ = "0.25.10"
File without changes
File without changes