dotlocalslashbin 0.0.8__tar.gz → 0.0.9__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: dotlocalslashbin
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: Download and extract files to `~/.local/bin/`.
5
5
  Author-email: Keith Maxwell <keith.maxwell@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -11,6 +11,7 @@ Requires-Dist: codespell ; extra == "test"
11
11
  Requires-Dist: flit ; extra == "test"
12
12
  Requires-Dist: mypy ; extra == "test"
13
13
  Requires-Dist: nox ; extra == "test"
14
+ Requires-Dist: pytest ; extra == "test"
14
15
  Requires-Dist: ruff ; extra == "test"
15
16
  Requires-Dist: usort ; extra == "test"
16
17
  Project-URL: Home, https://github.com/maxwell-k/dotlocalslashbin/
@@ -26,6 +26,7 @@ test = [
26
26
  "flit",
27
27
  "mypy",
28
28
  "nox",
29
+ "pytest",
29
30
  "ruff",
30
31
  "usort",
31
32
  ]
@@ -38,13 +39,10 @@ target-version = "py312"
38
39
  [tool.ruff.lint]
39
40
  select = ["ALL"]
40
41
  ignore = [
41
- # "C901", # TODO
42
42
  "D203", # incompatible with D211
43
43
  "D213", # incompatible with D212
44
44
  "I", # prefer usort to ruff isort implementation
45
- # "PLR0912", # TODO
46
- # "PLR0913", # TODO
47
- # "PLR0915", # TODO
45
+ "PT", # prefer unittest style
48
46
  "S310", # the rule errors on the "use instead" code from `ruff rule S310`
49
47
  "S602", # assume arguments to subprocess.run are validated
50
48
  "S603", # assume trusted input to subprocess.run
@@ -19,9 +19,9 @@ from urllib.request import urlopen
19
19
  from zipfile import ZipFile
20
20
 
21
21
 
22
- __version__ = "0.0.8"
22
+ __version__ = "0.0.9"
23
23
 
24
- DEFAULT_OUTPUT = Path("~/.local/bin/")
24
+ _OUTPUT = Path("~/.local/bin/")
25
25
  _SHA512_LENGTH = 128
26
26
 
27
27
 
@@ -84,7 +84,7 @@ def main() -> int:
84
84
  print(f"Error {e.code} downloading {e.url}")
85
85
  return 1
86
86
 
87
- arg0 = item.name if args.output == DEFAULT_OUTPUT else str(item.target)
87
+ arg0 = item.name if args.output == _OUTPUT else str(item.target.absolute())
88
88
  print(" ".join(("#" if item.version else "$", arg0, item.version or "")))
89
89
  if item.version:
90
90
  run([arg0, item.version], check=True)
@@ -135,7 +135,7 @@ def _parse_args() -> _CustomNamespace:
135
135
  help_ = "TOML specification"
136
136
  parser.add_argument("--input", default="bin.toml", help=help_, type=Path)
137
137
  help_ = "Target directory"
138
- parser.add_argument("--output", default=DEFAULT_OUTPUT, help=help_, type=Path)
138
+ parser.add_argument("--output", default=_OUTPUT, help=help_, type=Path)
139
139
  help_ = "Output directory"
140
140
  default = "~/.cache/dotlocalslashbin/"
141
141
  parser.add_argument("--downloaded", default=default, help=help_, type=Path)