annotate 1.2.4__tar.gz → 1.3.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.
- {annotate-1.2.4 → annotate-1.3.0}/CHANGES.rst +5 -0
- {annotate-1.2.4 → annotate-1.3.0}/MANIFEST.in +1 -1
- {annotate-1.2.4 → annotate-1.3.0}/PKG-INFO +9 -4
- {annotate-1.2.4 → annotate-1.3.0}/docs/conf.py +4 -2
- {annotate-1.2.4 → annotate-1.3.0}/pyproject.toml +50 -18
- annotate-1.3.0/src/annotate/__init__.py +6 -0
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate/_annotate.py +7 -2
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate.egg-info/PKG-INFO +9 -4
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate.egg-info/SOURCES.txt +1 -0
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate.egg-info/requires.txt +3 -3
- annotate-1.3.0/tests/data/.keep +0 -0
- annotate-1.2.4/src/annotate/__init__.py +0 -6
- {annotate-1.2.4 → annotate-1.3.0}/.readthedocs.yml +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/LICENSE +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/README.rst +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/docs/CHANGES.rst +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/docs/README.rst +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/docs/_static/.keep +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/docs/_templates/.keep +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/docs/index.rst +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/setup.cfg +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate/__about__.py +0 -0
- /annotate-1.2.4/tests/data/.keep → /annotate-1.3.0/src/annotate/py.typed +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate.egg-info/dependency_links.txt +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate.egg-info/top_level.txt +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/src/annotate.egg-info/zip-safe +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/tests/__init__.py +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/tests/__main__.py +0 -0
- {annotate-1.2.4 → annotate-1.3.0}/tests/test_main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: annotate
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Decorator to set a function's __annotations__ like Py3.
|
|
5
5
|
Author: Adam Karpierz
|
|
6
6
|
Author-email: adam@karpierz.net
|
|
@@ -33,7 +33,7 @@ Requires-Python: <4.0.0,>=3.10.0
|
|
|
33
33
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
34
34
|
License-File: LICENSE
|
|
35
35
|
Requires-Dist: setuptools>=80.9.0
|
|
36
|
-
Requires-Dist: pkg-about>=1.
|
|
36
|
+
Requires-Dist: pkg-about>=1.4.0
|
|
37
37
|
Provides-Extra: doc
|
|
38
38
|
Requires-Dist: Sphinx>=8.1.3; extra == "doc"
|
|
39
39
|
Requires-Dist: sphinx-autodoc-typehints>=3.0.1; extra == "doc"
|
|
@@ -45,8 +45,8 @@ Requires-Dist: sphinx-lint>=1.0.0; extra == "doc"
|
|
|
45
45
|
Requires-Dist: restructuredtext-lint>=1.4.0; extra == "doc"
|
|
46
46
|
Requires-Dist: nbsphinx>=0.9.7; extra == "doc"
|
|
47
47
|
Provides-Extra: test
|
|
48
|
-
Requires-Dist: deepdiff>=8.
|
|
49
|
-
Requires-Dist: rich>=14.
|
|
48
|
+
Requires-Dist: deepdiff>=8.6.0; extra == "test"
|
|
49
|
+
Requires-Dist: rich>=14.1.0; extra == "test"
|
|
50
50
|
Dynamic: license-file
|
|
51
51
|
|
|
52
52
|
annotate
|
|
@@ -288,6 +288,11 @@ Authors
|
|
|
288
288
|
Changelog
|
|
289
289
|
=========
|
|
290
290
|
|
|
291
|
+
1.3.0 (2025-09-01)
|
|
292
|
+
------------------
|
|
293
|
+
- Making the package typed.
|
|
294
|
+
- Setup (dependencies) update.
|
|
295
|
+
|
|
291
296
|
1.2.4 (2025-07-07)
|
|
292
297
|
------------------
|
|
293
298
|
- Setup (dependencies) update.
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
# list see the documentation:
|
|
5
5
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
from sphinx import application
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
about = __import__("pkg_about").about_from_setup()
|
|
10
|
+
|
|
11
|
+
def setup(app: application.Sphinx) -> None:
|
|
10
12
|
pass
|
|
11
13
|
|
|
12
14
|
# -- Path setup --------------------------------------------------------------
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
[build-system]
|
|
5
5
|
build-backend = 'setuptools.build_meta'
|
|
6
|
-
requires = ['setuptools>=80.9.0', 'packaging>=25.0.0', 'tox>=4.
|
|
6
|
+
requires = ['setuptools>=80.9.0', 'packaging>=25.0.0', 'tox>=4.29.0']
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = 'annotate'
|
|
10
|
-
version = '1.
|
|
10
|
+
version = '1.3.0'
|
|
11
11
|
description = '''Decorator to set a function's __annotations__ like Py3.'''
|
|
12
12
|
authors = [
|
|
13
13
|
{ name = 'Adam Karpierz' },
|
|
@@ -46,7 +46,7 @@ requires-python = '>=3.10.0,<4.0.0'
|
|
|
46
46
|
dependencies = [
|
|
47
47
|
# mandatory
|
|
48
48
|
'setuptools>=80.9.0',
|
|
49
|
-
'pkg-about>=1.
|
|
49
|
+
'pkg-about>=1.4.0',
|
|
50
50
|
# others
|
|
51
51
|
]
|
|
52
52
|
dynamic = ['readme']
|
|
@@ -62,8 +62,8 @@ optional-dependencies.'doc' = [
|
|
|
62
62
|
'nbsphinx>=0.9.7',
|
|
63
63
|
]
|
|
64
64
|
optional-dependencies.'test' = [
|
|
65
|
-
'deepdiff>=8.
|
|
66
|
-
'rich>=14.
|
|
65
|
+
'deepdiff>=8.6.0',
|
|
66
|
+
'rich>=14.1.0',
|
|
67
67
|
]
|
|
68
68
|
|
|
69
69
|
[project.scripts]
|
|
@@ -107,12 +107,13 @@ run.source = [
|
|
|
107
107
|
'tests',
|
|
108
108
|
]
|
|
109
109
|
run.omit = [
|
|
110
|
+
'**/tests/tman_*.py',
|
|
110
111
|
]
|
|
111
112
|
run.branch = true
|
|
112
113
|
run.data_file = '.tox/coverage/.coverage'
|
|
113
114
|
run.plugins = ['covdefaults']
|
|
114
115
|
# report
|
|
115
|
-
report.
|
|
116
|
+
report.exclude_also = [
|
|
116
117
|
# Regexes
|
|
117
118
|
# Have to re-enable the standard pragma
|
|
118
119
|
'^\s*if\s+self\.debug\s*:',
|
|
@@ -121,6 +122,7 @@ report.exclude_lines = [
|
|
|
121
122
|
'''if\s+__name__.*\s*==\s*['"]__main__['"]\s*:''',
|
|
122
123
|
'^\s*@unittest\.skip\(',
|
|
123
124
|
'^\s*@unittest\.skipIf\(sys\.platform\.startswith\("win"\)',
|
|
125
|
+
'if typing.TYPE_CHECKING:',
|
|
124
126
|
]
|
|
125
127
|
report.omit = [
|
|
126
128
|
'tests/run.py',
|
|
@@ -149,23 +151,39 @@ count = true
|
|
|
149
151
|
#verbose
|
|
150
152
|
#quiet
|
|
151
153
|
|
|
154
|
+
[tool.mypy]
|
|
155
|
+
python_version = '3.10'
|
|
156
|
+
strict = true
|
|
157
|
+
sqlite_cache = true
|
|
158
|
+
warn_unused_configs = true
|
|
159
|
+
exclude_gitignore = true
|
|
160
|
+
install_types = true
|
|
161
|
+
non_interactive = true
|
|
162
|
+
pretty = true
|
|
163
|
+
check_untyped_defs = true
|
|
164
|
+
#ignore_missing_imports = true
|
|
165
|
+
files = ['src']
|
|
166
|
+
#exclude = ['docs/', 'tests/']
|
|
167
|
+
|
|
152
168
|
#
|
|
153
169
|
# Configuration(s) for tox
|
|
154
170
|
#
|
|
155
171
|
|
|
156
172
|
[tool.tox]
|
|
157
|
-
env_list = [{replace='ref',of=['tool','tox','labels','py'],extend=true},
|
|
158
|
-
|
|
173
|
+
env_list = [{replace='ref',of=['tool','tox','labels','py'],extend=true},
|
|
174
|
+
'coverage', 'typing', 'lint', 'docs']
|
|
175
|
+
min_version = '4.29.0'
|
|
159
176
|
skip_missing_interpreters = true
|
|
160
177
|
requires = [
|
|
161
178
|
{replace='ref',of=['tool','tox','_','base','deps'],extend=true},
|
|
162
|
-
'virtualenv>=20.
|
|
163
|
-
'tox-backtick>=0.
|
|
179
|
+
'virtualenv>=20.34.0',
|
|
180
|
+
'tox-backtick>=0.7.0',
|
|
164
181
|
]
|
|
165
182
|
[tool.tox.labels]
|
|
166
183
|
py = ['py310','py311','py312','py313','py314', 'pypy310','pypy311']
|
|
167
|
-
prepare
|
|
184
|
+
prepare = ['prepare']
|
|
168
185
|
coverage = ['coverage']
|
|
186
|
+
typing = ['typing']
|
|
169
187
|
lint = ['lint']
|
|
170
188
|
docs = ['docs']
|
|
171
189
|
build = [{replace='ref',of=['tool','tox','labels','py'],extend=true}, 'docs', 'build']
|
|
@@ -174,13 +192,13 @@ deploy = [{replace='ref',of=['tool','tox','labels','build'],extend=true}, 'publi
|
|
|
174
192
|
[tool.tox._.base]
|
|
175
193
|
base_python = ['python3.13']
|
|
176
194
|
deps = [
|
|
177
|
-
'pip>=25.
|
|
195
|
+
'pip>=25.2',
|
|
178
196
|
'setuptools>=80.9.0',
|
|
179
197
|
]
|
|
180
198
|
package_subdir = 'annotate'
|
|
181
199
|
|
|
182
200
|
[tool.tox.env_run_base]
|
|
183
|
-
description =
|
|
201
|
+
description = 'Run tests under {base_python}'
|
|
184
202
|
set_env.PYTHONDONTWRITEBYTECODE = '1'
|
|
185
203
|
set_env.PKG_IMPL = "`python -W ignore -c \"import platform ; pimpl = platform.python_implementation() ; print('cp' if pimpl == 'CPython' else 'pp' if pimpl == 'PyPy' else '', end='')\" 2> nul`"
|
|
186
204
|
set_env.PKG_PVER = "`python -W ignore -c \"import platform ; print(''.join(platform.python_version_tuple()[:2]), end='')\" 2> nul`"
|
|
@@ -212,15 +230,15 @@ deps = []
|
|
|
212
230
|
base_python = {replace='ref',of=['tool','tox','_','base','base_python']}
|
|
213
231
|
commands = [
|
|
214
232
|
['{env_python}','-m','coverage','erase'],
|
|
215
|
-
['-','{env_python}','-m','coverage','run','-m','tests',{replace=
|
|
233
|
+
['-','{env_python}','-m','coverage','run','-m','tests',{replace='posargs',extend=true}],
|
|
216
234
|
['-','{env_python}','-m','coverage','html'],
|
|
217
235
|
['{env_python}','-m','coverage','report'],
|
|
218
236
|
]
|
|
219
237
|
deps = [
|
|
220
238
|
{replace='ref',of=['tool','tox','env_run_base','deps'],extend=true},
|
|
221
|
-
'coverage>=7.
|
|
239
|
+
'coverage>=7.10.6',
|
|
222
240
|
'covdefaults>=2.3.0',
|
|
223
|
-
'diff-cover>=9.
|
|
241
|
+
'diff-cover>=9.6.0',
|
|
224
242
|
]
|
|
225
243
|
|
|
226
244
|
[tool.tox.env.'docs']
|
|
@@ -247,7 +265,7 @@ commands = [
|
|
|
247
265
|
]
|
|
248
266
|
deps = [
|
|
249
267
|
{replace='ref',of=['tool','tox','env_run_base','deps'],extend=true},
|
|
250
|
-
'build>=1.
|
|
268
|
+
'build>=1.3.0',
|
|
251
269
|
'twine>=6.1.0',
|
|
252
270
|
]
|
|
253
271
|
|
|
@@ -264,6 +282,20 @@ deps = [
|
|
|
264
282
|
'twine>=6.1.0',
|
|
265
283
|
]
|
|
266
284
|
|
|
285
|
+
[tool.tox.env.'typing']
|
|
286
|
+
description = 'Static type checking'
|
|
287
|
+
base_python = {replace='ref',of=['tool','tox','_','base','base_python']}
|
|
288
|
+
commands = [
|
|
289
|
+
['{env_python}','-m','mypy'],
|
|
290
|
+
]
|
|
291
|
+
extras = []
|
|
292
|
+
deps = [
|
|
293
|
+
{replace='ref',of=['tool','tox','_','base','deps'],extend=true},
|
|
294
|
+
'mypy>=1.17.1',
|
|
295
|
+
'mypy_extensions>=1.1.0',
|
|
296
|
+
'types-setuptools>=80.9.0.20250822',
|
|
297
|
+
]
|
|
298
|
+
|
|
267
299
|
[tool.tox.env.'lint']
|
|
268
300
|
base_python = {replace='ref',of=['tool','tox','_','base','base_python']}
|
|
269
301
|
commands = [
|
|
@@ -277,6 +309,6 @@ deps = [
|
|
|
277
309
|
'flake8-pyproject>=1.2.3',
|
|
278
310
|
'flake8-docstrings>=1.7.0',
|
|
279
311
|
'pep8-naming>=0.15.1',
|
|
280
|
-
'flake8-builtins>=
|
|
312
|
+
'flake8-builtins>=3.0.0',
|
|
281
313
|
'flake8-deprecated>=2.2.1',
|
|
282
314
|
]
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
# Copyright (c) 2012 Adam Karpierz
|
|
2
2
|
# SPDX-License-Identifier: Zlib
|
|
3
3
|
|
|
4
|
+
from typing import TypeAlias, Any
|
|
5
|
+
from collections.abc import Callable
|
|
6
|
+
|
|
4
7
|
__all__ = ('annotate',)
|
|
5
8
|
|
|
9
|
+
AnyCallable: TypeAlias = Callable[..., Any]
|
|
10
|
+
|
|
6
11
|
|
|
7
|
-
def annotate(*args, **kwargs):
|
|
12
|
+
def annotate(*args: Any, **kwargs: Any) -> Callable[[AnyCallable], AnyCallable]:
|
|
8
13
|
"""Decorator to set a function's __annotations__ like Py3."""
|
|
9
14
|
|
|
10
|
-
def decorate(func):
|
|
15
|
+
def decorate(func: AnyCallable) -> AnyCallable:
|
|
11
16
|
if not getattr(func, "__annotations__", None): # pragma: no cover
|
|
12
17
|
func.__annotations__ = kwargs.copy()
|
|
13
18
|
if args:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: annotate
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Decorator to set a function's __annotations__ like Py3.
|
|
5
5
|
Author: Adam Karpierz
|
|
6
6
|
Author-email: adam@karpierz.net
|
|
@@ -33,7 +33,7 @@ Requires-Python: <4.0.0,>=3.10.0
|
|
|
33
33
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
34
34
|
License-File: LICENSE
|
|
35
35
|
Requires-Dist: setuptools>=80.9.0
|
|
36
|
-
Requires-Dist: pkg-about>=1.
|
|
36
|
+
Requires-Dist: pkg-about>=1.4.0
|
|
37
37
|
Provides-Extra: doc
|
|
38
38
|
Requires-Dist: Sphinx>=8.1.3; extra == "doc"
|
|
39
39
|
Requires-Dist: sphinx-autodoc-typehints>=3.0.1; extra == "doc"
|
|
@@ -45,8 +45,8 @@ Requires-Dist: sphinx-lint>=1.0.0; extra == "doc"
|
|
|
45
45
|
Requires-Dist: restructuredtext-lint>=1.4.0; extra == "doc"
|
|
46
46
|
Requires-Dist: nbsphinx>=0.9.7; extra == "doc"
|
|
47
47
|
Provides-Extra: test
|
|
48
|
-
Requires-Dist: deepdiff>=8.
|
|
49
|
-
Requires-Dist: rich>=14.
|
|
48
|
+
Requires-Dist: deepdiff>=8.6.0; extra == "test"
|
|
49
|
+
Requires-Dist: rich>=14.1.0; extra == "test"
|
|
50
50
|
Dynamic: license-file
|
|
51
51
|
|
|
52
52
|
annotate
|
|
@@ -288,6 +288,11 @@ Authors
|
|
|
288
288
|
Changelog
|
|
289
289
|
=========
|
|
290
290
|
|
|
291
|
+
1.3.0 (2025-09-01)
|
|
292
|
+
------------------
|
|
293
|
+
- Making the package typed.
|
|
294
|
+
- Setup (dependencies) update.
|
|
295
|
+
|
|
291
296
|
1.2.4 (2025-07-07)
|
|
292
297
|
------------------
|
|
293
298
|
- Setup (dependencies) update.
|
|
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
|