check-empty 1.1.4__tar.gz → 1.2.2__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.4
2
2
  Name: check-empty
3
- Version: 1.1.4
3
+ Version: 1.2.2
4
4
  Summary: Command-line utility, as well as a hook usable by the Python pre-commit framework, and a GitHub Action, to ensure that selected files are empty.
5
5
  Keywords: check,command-line,empty,files,github-action,helper,hook,lightweight,pre-commit,prek,tool,utility
6
6
  Author: Jonathan Dung
@@ -24,18 +24,13 @@ Classifier: Programming Language :: Python :: 3.12
24
24
  Classifier: Programming Language :: Python :: 3.13
25
25
  Classifier: Programming Language :: Python :: 3.14
26
26
  Classifier: Programming Language :: Python :: 3.15
27
+ Classifier: Programming Language :: Python :: 3.16
27
28
  Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
28
29
  Classifier: Topic :: Utilities
29
30
  Classifier: Typing :: Typed
30
- Requires-Dist: sphinx==9.1.0 ; python_full_version >= '3.12' and extra == 'docs'
31
- Requires-Dist: furo==2025.12.19 ; python_full_version >= '3.9' and extra == 'docs'
32
- Requires-Dist: sphinx-copybutton==0.5.2 ; python_full_version >= '3.7' and extra == 'docs'
33
- Requires-Dist: sphinx-notfound-page==1.1.0 ; python_full_version >= '3.8' and extra == 'docs'
34
- Requires-Dist: sphinx-argparse-cli==1.22.1 ; python_full_version >= '3.11' and extra == 'docs'
35
31
  Maintainer: Jonathan Dung
36
32
  Maintainer-email: Jonathan Dung <jonathandung@yahoo.com>
37
33
  Requires-Python: >=3.6
38
- Provides-Extra: docs
39
34
  Description-Content-Type: text/markdown
40
35
 
41
36
  # [check-empty](https://pypi.org/p/check-empty)
@@ -120,7 +115,7 @@ As a pre-commit hook:
120
115
  # .pre-commit-config.yaml
121
116
  repos:
122
117
  - repo: https://github.com/jonathandung/check-empty
123
- rev: v1.1.4 # repository version
118
+ rev: v1.2.2 # repository version
124
119
  hooks:
125
120
  - id: check-empty # the hook
126
121
  args: # example list of arguments
@@ -136,7 +131,7 @@ equivalent in `prek.toml` format:
136
131
  ```toml
137
132
  [[repos]]
138
133
  repo = "https://github.com/jonathandung/check-empty"
139
- rev = "v1.1.4"
134
+ rev = "v1.2.2"
140
135
 
141
136
  [[repos.hooks]]
142
137
  id = "check-empty"
@@ -160,7 +155,7 @@ or (TOML 1.1+):
160
155
  # using multiline inline tables
161
156
  [[repos]]
162
157
  repo = "https://github.com/jonathandung/check-empty"
163
- rev = "v1.1.4"
158
+ rev = "v1.2.2"
164
159
  hooks = [{
165
160
  id = "check-empty",
166
161
  args = ["-Q"],
@@ -180,7 +175,7 @@ As a GitHub Actions workflow step:
180
175
 
181
176
  ```yaml
182
177
  steps:
183
- - uses: jonathandung/check-empty@v1.1.4 # the latest version on the GitHub Actions
178
+ - uses: jonathandung/check-empty@v1.2.2 # the latest version on the GitHub Actions
184
179
  # marketplace; this step will fail and subsequent jobs will not run if any file is
185
180
  # not empty
186
181
  with:
@@ -232,8 +227,9 @@ to read the
232
227
  and the
233
228
  [contributing guide](https://github.com/jonathandung/.github/blob/main/CONTRIBUTING.md).
234
229
 
235
- To build the docs locally (needs Python 3.12+), install the `docs` extra, preferably
236
- into a virtual environment.
230
+ To build the docs locally (needs Python 3.12+), install with the `docs`
231
+ [group](https://packaging.python.org/en/latest/specifications/dependency-groups),
232
+ preferably into a virtual environment.
237
233
 
238
234
  Tests are run with:
239
235
 
@@ -80,7 +80,7 @@ As a pre-commit hook:
80
80
  # .pre-commit-config.yaml
81
81
  repos:
82
82
  - repo: https://github.com/jonathandung/check-empty
83
- rev: v1.1.4 # repository version
83
+ rev: v1.2.2 # repository version
84
84
  hooks:
85
85
  - id: check-empty # the hook
86
86
  args: # example list of arguments
@@ -96,7 +96,7 @@ equivalent in `prek.toml` format:
96
96
  ```toml
97
97
  [[repos]]
98
98
  repo = "https://github.com/jonathandung/check-empty"
99
- rev = "v1.1.4"
99
+ rev = "v1.2.2"
100
100
 
101
101
  [[repos.hooks]]
102
102
  id = "check-empty"
@@ -120,7 +120,7 @@ or (TOML 1.1+):
120
120
  # using multiline inline tables
121
121
  [[repos]]
122
122
  repo = "https://github.com/jonathandung/check-empty"
123
- rev = "v1.1.4"
123
+ rev = "v1.2.2"
124
124
  hooks = [{
125
125
  id = "check-empty",
126
126
  args = ["-Q"],
@@ -140,7 +140,7 @@ As a GitHub Actions workflow step:
140
140
 
141
141
  ```yaml
142
142
  steps:
143
- - uses: jonathandung/check-empty@v1.1.4 # the latest version on the GitHub Actions
143
+ - uses: jonathandung/check-empty@v1.2.2 # the latest version on the GitHub Actions
144
144
  # marketplace; this step will fail and subsequent jobs will not run if any file is
145
145
  # not empty
146
146
  with:
@@ -192,8 +192,9 @@ to read the
192
192
  and the
193
193
  [contributing guide](https://github.com/jonathandung/.github/blob/main/CONTRIBUTING.md).
194
194
 
195
- To build the docs locally (needs Python 3.12+), install the `docs` extra, preferably
196
- into a virtual environment.
195
+ To build the docs locally (needs Python 3.12+), install with the `docs`
196
+ [group](https://packaging.python.org/en/latest/specifications/dependency-groups),
197
+ preferably into a virtual environment.
197
198
 
198
199
  Tests are run with:
199
200
 
@@ -10,7 +10,7 @@ from __future__ import annotations
10
10
  import os
11
11
 
12
12
  __all__ = ('ExitCode', 'check')
13
- __version__ = '1.1.4'
13
+ __version__ = '1.2.2'
14
14
 
15
15
  TYPE_CHECKING = False
16
16
  if TYPE_CHECKING:
@@ -23,7 +23,7 @@ if TYPE_CHECKING:
23
23
  else:
24
24
  ExitCode = int
25
25
  _DIRECTORY_DESCRIPTOR_UNSUPPORTED: BaseException = (
26
- SystemError('somehow got directory descriptor on Windows')
26
+ SystemError('got directory descriptor on Windows')
27
27
  if os.name == 'nt'
28
28
  else NotImplementedError('directory descriptors are not supported')
29
29
  )
@@ -181,7 +181,7 @@ def check(
181
181
  q('\n')
182
182
  if verbosity > 2:
183
183
  p = k[0] if b is None else len(b) - 1
184
- q(f'{p} empty file{"" if p == 1 else "s"}\n' if p else 'No empty files\n')
184
+ q(f'{p or "No"} empty file{"" if p == 1 else "s"}\n')
185
185
  if y:
186
186
  if r is not None:
187
187
  q(('\nCleared: ' if clear else '\nNot empty: ').join(r))
@@ -10,18 +10,19 @@ if TYPE_CHECKING:
10
10
  from collections.abc import Iterable
11
11
 
12
12
  from check_empty import ExitCode
13
- __all__ = 'main', 'parser'
14
- parser = __import__('argparse').ArgumentParser(
13
+ __all__ = 'main',
14
+ _p = __import__('argparse').ArgumentParser(
15
15
  'check-empty',
16
16
  description='Assert or enforce that some files, or even directories, are empty. '
17
17
  'Makes some reasonable assumptions, such as the absence of another process '
18
- 'modifying a file or directory involved, while running.',
19
- epilog='It is preferred that you use this as a pre-commit or prek hook or GitHub '
20
- 'Action for most cases which are not one-off.',
18
+ 'modifying a file or directory involved while running, which is the responsibility'
19
+ ' of the user to ensure.',
20
+ epilog='It is preferred that you use this as a pre-commit or prek hook, or a step '
21
+ 'in a GitHub Actions workflow, for most cases.',
21
22
  fromfile_prefix_chars='@',
22
23
  add_help=False,
23
24
  )
24
- f = parser.add_argument
25
+ f = _p.add_argument
25
26
  f('filenames', nargs='+', help='the files that should be empty')
26
27
  f('-?', '-h', '--help', action='help', help='show this help message and exit')
27
28
  f('-v', '--version', action='version', version='check-empty v' + c.__version__)
@@ -30,15 +31,15 @@ f(
30
31
  '-m',
31
32
  '--may-not-exist',
32
33
  action='store_true',
33
- help='do not fail solely because some files are not present',
34
+ help='succeed even if some files are not present',
34
35
  )
35
36
  f('-Q', '--quiet', action='count', default=0, help='decrease output verbosity')
36
37
  f('-V', '--verbose', action='count', default=0, help='increase output verbosity')
37
38
  f('-o', '--out', help='write output to this file instead of stdout')
38
39
 
39
40
 
40
- def _ret_parser():
41
- return parser
41
+ def _r():
42
+ return _p
42
43
 
43
44
 
44
45
  def main(argv: Iterable[str] | None = None) -> ExitCode | typing.Literal[2]:
@@ -52,7 +53,7 @@ def main(argv: Iterable[str] | None = None) -> ExitCode | typing.Literal[2]:
52
53
 
53
54
  """
54
55
  try:
55
- n = parser.parse_args(argv)
56
+ n = _p.parse_args(argv)
56
57
  except SystemExit as e:
57
58
  return e.code # ty: ignore[invalid-return-type]
58
59
  o = n.out
@@ -74,4 +75,4 @@ def main(argv: Iterable[str] | None = None) -> ExitCode | typing.Literal[2]:
74
75
 
75
76
  del f, TYPE_CHECKING
76
77
  if __name__ == '__main__':
77
- parser.exit(main())
78
+ _p.exit(main())
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["uv_build>=0.12.7"]
2
+ requires = ["uv_build>=0.12.10"]
3
3
  build-backend = "uv_build"
4
4
 
5
5
  [project]
@@ -20,6 +20,7 @@ classifiers = [
20
20
  "Programming Language :: Python :: 3.13",
21
21
  "Programming Language :: Python :: 3.14",
22
22
  "Programming Language :: Python :: 3.15",
23
+ "Programming Language :: Python :: 3.16",
23
24
  "Programming Language :: Python :: Free Threading :: 3 - Stable",
24
25
  "Topic :: Utilities",
25
26
  "Typing :: Typed",
@@ -47,7 +48,7 @@ license-files = [
47
48
  name = "check-empty"
48
49
  readme = "README.md"
49
50
  requires-python = ">=3.6"
50
- version = "1.1.4"
51
+ version = "1.2.2"
51
52
 
52
53
  [[project.authors]]
53
54
  name = "Jonathan Dung"
@@ -57,20 +58,21 @@ email = "jonathandung@yahoo.com"
57
58
  name = "Jonathan Dung"
58
59
  email = "jonathandung@yahoo.com"
59
60
 
60
- [project.optional-dependencies]
61
- docs = [
62
- "sphinx==9.1.0; python_version>='3.12'",
63
- "furo==2025.12.19; python_version>='3.9'",
64
- "sphinx-copybutton==0.5.2; python_version>='3.7'",
65
- "sphinx-notfound-page==1.1.0; python_version>='3.8'",
66
- "sphinx-argparse-cli==1.22.1; python_version>='3.11'",
67
- ]
68
-
69
61
  [project.scripts]
70
62
  check-empty = "check_empty.__main__:main"
71
63
 
64
+ [dependency-groups]
65
+ docs = [
66
+ "furo==2025.12.19",
67
+ "sphinx==9.1.0",
68
+ "sphinx-argparse-cli==1.22.1",
69
+ "sphinx-copybutton==0.5.2",
70
+ "sphinx-lint==1.0.2",
71
+ "sphinx-notfound-page==1.1.0",
72
+ ]
73
+
72
74
  [tool.ruff]
73
- required-version = ">=0.16.5"
75
+ required-version = ">=0.16.6"
74
76
  target-version = "py37"
75
77
 
76
78
  [tool.ruff.analyze]
@@ -127,26 +129,11 @@ all = "error"
127
129
  missing-override-decorator = "ignore"
128
130
 
129
131
  [tool.uv]
130
- required-version = ">=0.12.7"
131
-
132
- [tool.uv.audit]
133
- ignore = [
134
- "GHSA-2xpw-w6gg-jr37",
135
- "GHSA-34jh-p97f-mpxf",
136
- "GHSA-38jv-5279-wg99",
137
- "GHSA-48p4-8xcf-vxj5",
138
- "GHSA-5239-wwwm-4pmq",
139
- "GHSA-65pc-fj4g-8rjx",
140
- "GHSA-9hjg-9r4m-mvj7",
141
- "GHSA-9wx4-h78v-vm56",
142
- "GHSA-gc5v-m9x4-r6x2",
143
- "GHSA-gm62-xv2j-4w53",
144
- "GHSA-jfmj-5v4g-7637",
145
- "GHSA-mf9v-mfxr-j63j",
146
- "GHSA-pq67-6m6q-mj2v",
147
- "GHSA-qccp-gfcp-xxvc",
148
- ]
132
+ required-version = ">=0.12.10"
149
133
 
150
134
  [tool.uv.build-backend]
151
135
  module-name = "check_empty"
152
136
  module-root = ""
137
+
138
+ [tool.uv.dependency-groups.docs]
139
+ requires-python = ">=3.12"
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["uv_build>=0.12.7"]
2
+ requires = ["uv_build>=0.12.10"]
3
3
  build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  authors = [{name = "Jonathan Dung", email = "jonathandung@yahoo.com"}]
7
- classifiers = ["Development Status :: 5 - Production/Stable", "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"]
7
+ classifiers = ["Development Status :: 5 - Production/Stable", "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 :: 3.16", "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, and a GitHub Action, to ensure that selected files are empty."
9
9
  keywords = ["check", "command-line", "empty", "files", "github-action", "helper", "hook", "lightweight", "pre-commit", "prek", "tool", "utility"]
10
10
  license = "MIT"
@@ -13,16 +13,16 @@ maintainers = [{name = "Jonathan Dung", email = "jonathandung@yahoo.com"}]
13
13
  name = "check-empty"
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.6"
16
- version = "1.1.4"
16
+ version = "1.2.2"
17
17
 
18
- [project.optional-dependencies]
19
- docs = ["sphinx==9.1.0; python_version>='3.12'", "furo==2025.12.19; python_version>='3.9'", "sphinx-copybutton==0.5.2; python_version>='3.7'", "sphinx-notfound-page==1.1.0; python_version>='3.8'", "sphinx-argparse-cli==1.22.1; python_version>='3.11'"]
18
+ [dependency-groups]
19
+ docs = ["furo==2025.12.19", "sphinx==9.1.0", "sphinx-argparse-cli==1.22.1", "sphinx-copybutton==0.5.2", "sphinx-lint==1.0.2", "sphinx-notfound-page==1.1.0"]
20
20
 
21
21
  [project.scripts]
22
22
  check-empty = "check_empty.__main__:main"
23
23
 
24
24
  [tool.ruff]
25
- required-version = ">=0.16.5"
25
+ required-version = ">=0.16.6"
26
26
  target-version = "py37"
27
27
 
28
28
  [tool.ruff.analyze]
@@ -58,11 +58,11 @@ all = "error"
58
58
  missing-override-decorator = "ignore"
59
59
 
60
60
  [tool.uv]
61
- required-version = ">=0.12.7"
62
-
63
- [tool.uv.audit]
64
- ignore = ["GHSA-2xpw-w6gg-jr37", "GHSA-34jh-p97f-mpxf", "GHSA-38jv-5279-wg99", "GHSA-48p4-8xcf-vxj5", "GHSA-5239-wwwm-4pmq", "GHSA-65pc-fj4g-8rjx", "GHSA-9hjg-9r4m-mvj7", "GHSA-9wx4-h78v-vm56", "GHSA-gc5v-m9x4-r6x2", "GHSA-gm62-xv2j-4w53", "GHSA-jfmj-5v4g-7637", "GHSA-mf9v-mfxr-j63j", "GHSA-pq67-6m6q-mj2v", "GHSA-qccp-gfcp-xxvc"]
61
+ required-version = ">=0.12.10"
65
62
 
66
63
  [tool.uv.build-backend]
67
64
  module-name = "check_empty"
68
65
  module-root = ""
66
+
67
+ [tool.uv.dependency-groups]
68
+ docs = {requires-python = ">=3.12"}
File without changes
File without changes