check-empty 0.2.0__tar.gz → 0.5.0__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.
@@ -10,4 +10,4 @@
10
10
 
11
11
  ## All other contributors and their affiliations
12
12
 
13
- None at the moment.
13
+ None at the moment.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: check-empty
3
- Version: 0.2.0
3
+ Version: 0.5.0
4
4
  Summary: Command-line utility, as well as a hook usable by the Python pre-commit framework, to ensure that selected files are empty.
5
- Keywords: check,command-line,empty,github-action,hook,lightweight,pre-commit,prek,tool,utility
5
+ Keywords: check,command-line,empty,files,github-action,helper,hook,lightweight,pre-commit,prek,tool,utility
6
6
  Author: Jonathan Dung
7
7
  Author-email: Jonathan Dung <jonathandung@yahoo.com>
8
8
  License-Expression: MIT
@@ -29,20 +29,31 @@ Classifier: Topic :: Utilities
29
29
  Classifier: Typing :: Typed
30
30
  Maintainer: Jonathan Dung
31
31
  Maintainer-email: Jonathan Dung <jonathandung@yahoo.com>
32
- Requires-Python: >=3.7
32
+ Requires-Python: >=3.6
33
33
  Description-Content-Type: text/markdown
34
34
 
35
35
  # check-empty
36
36
 
37
- A simple [pre-commit](https://pre-commit.com)/[prek](https://prek.j178.dev) hook that
37
+ A simple, dependency-free and intuitive [pre-commit](https://pre-commit.com)/
38
+ [prek](https://prek.j178.dev) hook, CLI, library and GitHub Action conglomerate that
38
39
  makes sure selected files are empty according to a filesystem stat call and clears them
39
- effectively on demand with a write-mode open and immediate close. Also acts as a CLI,
40
- library and GitHub Action conglomerate.
40
+ effectively with minimal I/O if required, written in Python. Also available as a tool on
41
+ uv. Supports CPython 3.6+, PyPy 7.0+, GraalPy 19.0+ and (untested) every Python runtime
42
+ you can think of that implements Python 3 syntax and f-strings.
41
43
 
42
44
  ## Quickstart
43
45
 
46
+ Without installation (testing out the capabilities):
47
+
44
48
  ```bash
45
- uv tool install check-empty # uv
49
+ uvx check-empty -q src/mylib/py.typed docs/.nojekyll static/.gitkeep
50
+ ```
51
+
52
+ ```bash
53
+ # uv
54
+ uv tool install check-empty # bare executable on PATH
55
+ uv pip install check-empty # if you want the library as well
56
+
46
57
  pip install check-empty # pip
47
58
  ```
48
59
 
@@ -64,7 +75,7 @@ As a pre-commit hook:
64
75
  # .pre-commit-config.yaml
65
76
  repos:
66
77
  - repo: https://github.com/jonathandung/check-empty
67
- rev: v0.2.0 # repository version
78
+ rev: v0.5.0 # repository version
68
79
  hooks:
69
80
  - id: check-empty # the hook
70
81
  args: # example list of arguments
@@ -81,7 +92,7 @@ equivalent in `prek.toml` format:
81
92
  ```toml
82
93
  [[repos]]
83
94
  repo = "https://github.com/jonathandung/check-empty"
84
- rev = "v0.2.0"
95
+ rev = "v0.5.0"
85
96
  hooks = [{
86
97
  id = "check-empty",
87
98
  args = [
@@ -97,7 +108,7 @@ As a GitHub action step:
97
108
 
98
109
  ```yaml
99
110
  steps:
100
- - uses: jonathandung/check-empty@v0.2.0 # the latest version on the GitHub Actions
111
+ - uses: jonathandung/check-empty@v0.5.0 # the latest version on the GitHub Actions
101
112
  # marketplace; this step will fail and subsequent jobs will not run if any file is
102
113
  # not empty
103
114
  with:
@@ -1,14 +1,25 @@
1
1
  # check-empty
2
2
 
3
- A simple [pre-commit](https://pre-commit.com)/[prek](https://prek.j178.dev) hook that
3
+ A simple, dependency-free and intuitive [pre-commit](https://pre-commit.com)/
4
+ [prek](https://prek.j178.dev) hook, CLI, library and GitHub Action conglomerate that
4
5
  makes sure selected files are empty according to a filesystem stat call and clears them
5
- effectively on demand with a write-mode open and immediate close. Also acts as a CLI,
6
- library and GitHub Action conglomerate.
6
+ effectively with minimal I/O if required, written in Python. Also available as a tool on
7
+ uv. Supports CPython 3.6+, PyPy 7.0+, GraalPy 19.0+ and (untested) every Python runtime
8
+ you can think of that implements Python 3 syntax and f-strings.
7
9
 
8
10
  ## Quickstart
9
11
 
12
+ Without installation (testing out the capabilities):
13
+
10
14
  ```bash
11
- uv tool install check-empty # uv
15
+ uvx check-empty -q src/mylib/py.typed docs/.nojekyll static/.gitkeep
16
+ ```
17
+
18
+ ```bash
19
+ # uv
20
+ uv tool install check-empty # bare executable on PATH
21
+ uv pip install check-empty # if you want the library as well
22
+
12
23
  pip install check-empty # pip
13
24
  ```
14
25
 
@@ -30,7 +41,7 @@ As a pre-commit hook:
30
41
  # .pre-commit-config.yaml
31
42
  repos:
32
43
  - repo: https://github.com/jonathandung/check-empty
33
- rev: v0.2.0 # repository version
44
+ rev: v0.5.0 # repository version
34
45
  hooks:
35
46
  - id: check-empty # the hook
36
47
  args: # example list of arguments
@@ -47,7 +58,7 @@ equivalent in `prek.toml` format:
47
58
  ```toml
48
59
  [[repos]]
49
60
  repo = "https://github.com/jonathandung/check-empty"
50
- rev = "v0.2.0"
61
+ rev = "v0.5.0"
51
62
  hooks = [{
52
63
  id = "check-empty",
53
64
  args = [
@@ -63,7 +74,7 @@ As a GitHub action step:
63
74
 
64
75
  ```yaml
65
76
  steps:
66
- - uses: jonathandung/check-empty@v0.2.0 # the latest version on the GitHub Actions
77
+ - uses: jonathandung/check-empty@v0.5.0 # the latest version on the GitHub Actions
67
78
  # marketplace; this step will fail and subsequent jobs will not run if any file is
68
79
  # not empty
69
80
  with:
@@ -32,7 +32,7 @@ def main(argv: Sequence[str] | None = None) -> Literal[0, 1, 2, 3]:
32
32
 
33
33
  Returns:
34
34
  The exit code. A bitwise or of 1 (some files were not empty) and 2 (some files
35
- were absent and --must-exist was specified), such that 0 is the only return
35
+ were absent and -m/--must-exist was specified), such that 0 is the only return
36
36
  value that represents success as expected.
37
37
 
38
38
  """
@@ -79,5 +79,5 @@ def main(argv: Sequence[str] | None = None) -> Literal[0, 1, 2, 3]:
79
79
 
80
80
 
81
81
  if __name__ == '__main__':
82
- raise SystemExit(main())
82
+ parser.exit(main())
83
83
  del f, TYPE_CHECKING
@@ -6,14 +6,14 @@ build-backend = "uv_build"
6
6
  authors = [{name = "Jonathan Dung", email = "jonathandung@yahoo.com"}]
7
7
  classifiers = ["Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Free Threading :: 3 - Stable", "Topic :: Utilities", "Typing :: Typed"]
8
8
  description = "Command-line utility, as well as a hook usable by the Python pre-commit framework, to ensure that selected files are empty."
9
- keywords = ["check", "command-line", "empty", "github-action", "hook", "lightweight", "pre-commit", "prek", "tool", "utility"]
9
+ keywords = ["check", "command-line", "empty", "files", "github-action", "helper", "hook", "lightweight", "pre-commit", "prek", "tool", "utility"]
10
10
  license = "MIT"
11
11
  license-files = ["LICENSE", "AUTHORS.md"]
12
12
  maintainers = [{name = "Jonathan Dung", email = "jonathandung@yahoo.com"}]
13
13
  name = "check-empty"
14
14
  readme = "README.md"
15
- requires-python = ">=3.7"
16
- version = "0.2.0"
15
+ requires-python = ">=3.6"
16
+ version = "0.5.0"
17
17
 
18
18
  [project.scripts]
19
19
  check-empty = "check_empty.__main__:main"
File without changes