hunterMakesPy 0.7.1__tar.gz → 0.7.3__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.
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/PKG-INFO +3 -4
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/dataStructures.py +21 -21
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/parseParameters.py +56 -67
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/tests/test_dataStructures.py +0 -1
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/theTypes.py +2 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/theTypesCallableFunction.py +3 -2
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy.egg-info/PKG-INFO +3 -4
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy.egg-info/requires.txt +1 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/pyproject.toml +4 -11
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/LICENSE +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/README.md +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/__init__.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/_theSSOT.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/coping.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/filesystemToolkit.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/py.typed +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/semiotics.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/tests/__init__.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/tests/conftest.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/tests/test_coping.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/tests/test_filesystemToolkit.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/tests/test_parseParameters.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy/tests/test_theTypes.py +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy.egg-info/SOURCES.txt +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy.egg-info/dependency_links.txt +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/hunterMakesPy.egg-info/top_level.txt +0 -0
- {huntermakespy-0.7.1 → huntermakespy-0.7.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hunterMakesPy
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Easy Python functions making making functional Python functions easier.
|
|
5
5
|
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
6
|
License-Expression: CC-BY-NC-4.0
|
|
@@ -9,13 +9,11 @@ Project-URL: Donate, https://www.patreon.com/integrated
|
|
|
9
9
|
Project-URL: Homepage, https://github.com/hunterhogan/hunterMakesPy
|
|
10
10
|
Project-URL: Issues, https://github.com/hunterhogan/hunterMakesPy/issues
|
|
11
11
|
Project-URL: Repository, https://github.com/hunterhogan/hunterMakesPy
|
|
12
|
-
Keywords:
|
|
12
|
+
Keywords: input validation,module loading,package settings,parameter validation
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Environment :: Console
|
|
15
15
|
Classifier: Framework :: Pytest
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
|
-
Classifier: Intended Audience :: End Users/Desktop
|
|
18
|
-
Classifier: Intended Audience :: Other Audience
|
|
19
17
|
Classifier: Natural Language :: English
|
|
20
18
|
Classifier: Operating System :: OS Independent
|
|
21
19
|
Classifier: Programming Language :: Python
|
|
@@ -27,6 +25,7 @@ Classifier: Typing :: Typed
|
|
|
27
25
|
Requires-Python: >=3.10
|
|
28
26
|
Description-Content-Type: text/markdown
|
|
29
27
|
License-File: LICENSE
|
|
28
|
+
Requires-Dist: Z0Z_tools>=2.2.1
|
|
30
29
|
Requires-Dist: autoflake
|
|
31
30
|
Requires-Dist: charset_normalizer
|
|
32
31
|
Requires-Dist: isort
|
|
@@ -17,8 +17,11 @@ Functions
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
19
|
from charset_normalizer import CharsetMatch
|
|
20
|
+
from collections.abc import Hashable
|
|
21
|
+
from humpy_cytoolz.dicttoolz import valmap
|
|
22
|
+
from humpy_cytoolz.functoolz import compose
|
|
20
23
|
from types import FunctionType
|
|
21
|
-
from typing import cast, TYPE_CHECKING
|
|
24
|
+
from typing import cast, TYPE_CHECKING, TypeVar
|
|
22
25
|
import charset_normalizer
|
|
23
26
|
import more_itertools
|
|
24
27
|
import re as regex
|
|
@@ -173,7 +176,7 @@ def autoDecodingRLE(arrayTarget: NDArray[integer[Any]], *, assumeAddSpaces: bool
|
|
|
173
176
|
arrayAsStr = patternRegex.sub(replacementByContext, arrayAsStr)
|
|
174
177
|
arrayAsStr = patternRegex.sub(replacementByContext, arrayAsStr)
|
|
175
178
|
|
|
176
|
-
#
|
|
179
|
+
# .replace `range(0,stop)` syntax with `range(stop)` syntax.
|
|
177
180
|
# Add unpack operator `*` for automatic decoding when evaluated.
|
|
178
181
|
return arrayAsStr.replace('range(0,', 'range(').replace('range', '*range')
|
|
179
182
|
|
|
@@ -239,14 +242,17 @@ def stringItUp(*scrapPile: Any) -> list[str]:
|
|
|
239
242
|
listStrungUp.append(repr(scrap))
|
|
240
243
|
return listStrungUp
|
|
241
244
|
|
|
242
|
-
|
|
245
|
+
文件 = TypeVar('文件', bound=Hashable)
|
|
246
|
+
|
|
247
|
+
# TODO if `reorderLists: bool = False`, the elements do not need to be ordinals, and they should be covariant.
|
|
248
|
+
def updateExtendPolishDictionaryLists(*dictionaryLists: Mapping[文件, list[小于] | set[小于] | tuple[小于, ...]], destroyDuplicates: bool = False, reorderLists: bool = False, killErroneousDataTypes: bool = False) -> dict[文件, list[小于]]:
|
|
243
249
|
"""Merge multiple dictionaries with `list` values into a single dictionary with the `list` values merged.
|
|
244
250
|
|
|
245
251
|
Plus options to destroy duplicates, sort `list` values, and handle erroneous data types.
|
|
246
252
|
|
|
247
253
|
Parameters
|
|
248
254
|
----------
|
|
249
|
-
*dictionaryLists :
|
|
255
|
+
*dictionaryLists : MutableMapping[文件, list[Any] | set[Any] | tuple[Any, ...]]
|
|
250
256
|
Variable number of dictionaries to be merged. If only one dictionary is passed, it will be
|
|
251
257
|
"polished".
|
|
252
258
|
destroyDuplicates : bool = False
|
|
@@ -260,37 +266,31 @@ def updateExtendPolishDictionaryLists(*dictionaryLists: Mapping[str, list[小于
|
|
|
260
266
|
|
|
261
267
|
Returns
|
|
262
268
|
-------
|
|
263
|
-
ePluribusUnum : dict[
|
|
269
|
+
ePluribusUnum : dict[文件, list[Any]]
|
|
264
270
|
A single dictionary with merged and optionally "polished" `list` values.
|
|
265
271
|
|
|
266
272
|
Notes
|
|
267
273
|
-----
|
|
268
|
-
The returned value, `ePluribusUnum`, is a
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
original data type to a `list`, for example, may not preserve the order even if you want the
|
|
273
|
-
order to be preserved.
|
|
274
|
+
The returned value, `ePluribusUnum`, is a dictionary (`dict`). Furthermore, every dictionary value
|
|
275
|
+
is a `list`. If `dictionaryLists` has values that are not data type `list`, the data type will not
|
|
276
|
+
be preserved. That could have unexpected consequences. Conversion from the original data type to a
|
|
277
|
+
`list`, for example, may not preserve the order even if you want the order to be preserved.
|
|
274
278
|
""" # noqa: DOC501
|
|
275
|
-
ePluribusUnum: dict[
|
|
279
|
+
ePluribusUnum: dict[文件, list[小于]] = {}
|
|
276
280
|
|
|
277
281
|
for dictionaryListTarget in dictionaryLists:
|
|
278
282
|
for keyName, keyValue in dictionaryListTarget.items():
|
|
279
283
|
try:
|
|
280
|
-
ImaStr = str(keyName)
|
|
281
284
|
ImaList: list[小于] = list(keyValue)
|
|
282
|
-
ePluribusUnum.setdefault(
|
|
283
|
-
except TypeError: # noqa: PERF203
|
|
285
|
+
ePluribusUnum.setdefault(keyName, []).extend(ImaList)
|
|
286
|
+
except TypeError as error: # noqa: PERF203
|
|
284
287
|
if killErroneousDataTypes:
|
|
285
288
|
continue
|
|
286
|
-
|
|
287
|
-
raise
|
|
289
|
+
raise TypeError from error
|
|
288
290
|
|
|
289
291
|
if destroyDuplicates:
|
|
290
|
-
|
|
291
|
-
ePluribusUnum[ImaStr] = list(dict.fromkeys(ImaList))
|
|
292
|
+
ePluribusUnum = valmap(compose(list, dict.fromkeys), ePluribusUnum)
|
|
292
293
|
if reorderLists:
|
|
293
|
-
|
|
294
|
-
ePluribusUnum[ImaStr] = sorted(ImaRichComparisonSupporter)
|
|
294
|
+
ePluribusUnum = valmap(sorted, ePluribusUnum)
|
|
295
295
|
|
|
296
296
|
return ePluribusUnum
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# ruff: noqa: TRY301, DOC501, PLW0717 BLE001
|
|
1
2
|
"""Validate parameters and parse input with defensive error handling.
|
|
2
3
|
|
|
3
4
|
(AI generated docstring)
|
|
@@ -35,7 +36,7 @@ References
|
|
|
35
36
|
"""
|
|
36
37
|
from __future__ import annotations
|
|
37
38
|
|
|
38
|
-
from collections.abc import
|
|
39
|
+
from collections.abc import Sized
|
|
39
40
|
from dataclasses import dataclass
|
|
40
41
|
from typing import TYPE_CHECKING
|
|
41
42
|
import charset_normalizer
|
|
@@ -44,6 +45,8 @@ import sys
|
|
|
44
45
|
|
|
45
46
|
if TYPE_CHECKING:
|
|
46
47
|
from charset_normalizer.models import CharsetMatch
|
|
48
|
+
from collections.abc import Iterable
|
|
49
|
+
from hunterMakesPy.theTypes import Limitation
|
|
47
50
|
from typing import Any
|
|
48
51
|
|
|
49
52
|
@dataclass
|
|
@@ -68,60 +71,9 @@ class ErrorMessageContext:
|
|
|
68
71
|
containerType: str | None = None
|
|
69
72
|
isElement: bool = False
|
|
70
73
|
|
|
71
|
-
def
|
|
72
|
-
"""Construct error message from available context using template.
|
|
73
|
-
|
|
74
|
-
I received ["value" | a value | `None`] [of type `type` | `None`] [as an element in | `None`] [a `containerType` type |
|
|
75
|
-
`None`] but `parameterName` must have integers [in type(s) `parameterType` | `None`].
|
|
76
|
-
|
|
77
|
-
Hypothetically, this is a prototype that can be generalized to other functions. In this package and a few of my other
|
|
78
|
-
packages, I have developed standardized error messages, but those are quite different from this. I will certainly continue to
|
|
79
|
-
develop this kind of functionality, and this function will influence things.
|
|
80
|
-
|
|
81
|
-
Parameters
|
|
82
|
-
----------
|
|
83
|
-
context : ErrorMessageContext
|
|
84
|
-
The error context containing parameter value, type, and container information.
|
|
85
|
-
parameterName : str
|
|
86
|
-
The name of the parameter that caused the error.
|
|
87
|
-
parameterType : type[Any] | None
|
|
88
|
-
The expected type of the parameter, used in error messages.
|
|
89
|
-
|
|
90
|
-
Returns
|
|
91
|
-
-------
|
|
92
|
-
errorMessage : str
|
|
93
|
-
The constructed error message string.
|
|
94
|
-
|
|
95
|
-
"""
|
|
96
|
-
messageParts: list[str] = ["I received "]
|
|
97
|
-
|
|
98
|
-
if context.parameterValue is not None and not isinstance(context.parameterValue, (bytes, bytearray, memoryview)):
|
|
99
|
-
messageParts.append(f'"{context.parameterValue}"')
|
|
100
|
-
else:
|
|
101
|
-
messageParts.append("a value")
|
|
102
|
-
|
|
103
|
-
if context.parameterValueType:
|
|
104
|
-
messageParts.append(f" of type `{context.parameterValueType}`")
|
|
105
|
-
|
|
106
|
-
if context.isElement:
|
|
107
|
-
messageParts.append(" as an element in")
|
|
108
|
-
|
|
109
|
-
if context.containerType:
|
|
110
|
-
messageParts.append(f" a `{context.containerType}` type")
|
|
111
|
-
|
|
112
|
-
messageParts.append(f" but {parameterName} must have integers")
|
|
113
|
-
|
|
114
|
-
if parameterType:
|
|
115
|
-
messageParts.append(f" in type(s) `{parameterType}`")
|
|
116
|
-
|
|
117
|
-
return "".join(messageParts)
|
|
118
|
-
|
|
119
|
-
def defineConcurrencyLimit(*, limit: bool | float | int | None, cpuTotal: int = multiprocessing.cpu_count()) -> int:
|
|
74
|
+
def defineConcurrencyLimit(*, limit: Limitation, cpuTotal: int = multiprocessing.cpu_count()) -> int:
|
|
120
75
|
"""Determine the concurrency limit based on the provided parameter.
|
|
121
76
|
|
|
122
|
-
Tests for this function can be run with:
|
|
123
|
-
`from hunterMakesPy.tests.test_parseParameters import PytestFor_defineConcurrencyLimit`
|
|
124
|
-
|
|
125
77
|
Parameters
|
|
126
78
|
----------
|
|
127
79
|
limit : bool | float | int | None
|
|
@@ -134,20 +86,11 @@ def defineConcurrencyLimit(*, limit: bool | float | int | None, cpuTotal: int =
|
|
|
134
86
|
concurrencyLimit : int
|
|
135
87
|
The calculated concurrency limit, ensuring it is at least 1.
|
|
136
88
|
|
|
137
|
-
Notes
|
|
138
|
-
-----
|
|
139
|
-
Consider using `hunterMakesPy.oopsieKwargsie()` to handle malformed inputs. For example:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
if not (CPUlimit is None or isinstance(CPUlimit, (bool, int, float))):
|
|
143
|
-
CPUlimit = oopsieKwargsie(CPUlimit)
|
|
144
|
-
```
|
|
145
|
-
|
|
146
89
|
Example parameters
|
|
147
90
|
------------------
|
|
148
91
|
```python
|
|
149
92
|
CPUlimit: bool | float | int | None
|
|
150
|
-
CPUlimit:
|
|
93
|
+
CPUlimit: Limitation = None
|
|
151
94
|
```
|
|
152
95
|
|
|
153
96
|
Example docstring
|
|
@@ -171,7 +114,7 @@ def defineConcurrencyLimit(*, limit: bool | float | int | None, cpuTotal: int =
|
|
|
171
114
|
- If the value of `CPUlimit` is a `float` greater than 1 or less than -1, the function truncates the value to an `int` with the same sign as the `float`.
|
|
172
115
|
```
|
|
173
116
|
|
|
174
|
-
"""
|
|
117
|
+
"""
|
|
175
118
|
if isinstance(limit, str):
|
|
176
119
|
limitFromString: bool | str | None = oopsieKwargsie(limit)
|
|
177
120
|
if isinstance(limitFromString, str):
|
|
@@ -204,7 +147,53 @@ def defineConcurrencyLimit(*, limit: bool | float | int | None, cpuTotal: int =
|
|
|
204
147
|
concurrencyLimit = min(concurrencyLimit, 61)
|
|
205
148
|
return max(int(concurrencyLimit), 1)
|
|
206
149
|
|
|
207
|
-
|
|
150
|
+
def _constructErrorMessage(context: ErrorMessageContext, parameterName: str, parameterType: type[Any] | None) -> str:
|
|
151
|
+
"""Construct error message from available context using template.
|
|
152
|
+
|
|
153
|
+
I received ["value" | a value | `None`] [of type `type` | `None`] [as an element in | `None`] [a `containerType` type |
|
|
154
|
+
`None`] but `parameterName` must have integers [in type(s) `parameterType` | `None`].
|
|
155
|
+
|
|
156
|
+
Hypothetically, this is a prototype that can be generalized to other functions. In this package and a few of my other
|
|
157
|
+
packages, I have developed standardized error messages, but those are quite different from this. I will certainly continue to
|
|
158
|
+
develop this kind of functionality, and this function will influence things.
|
|
159
|
+
|
|
160
|
+
Parameters
|
|
161
|
+
----------
|
|
162
|
+
context : ErrorMessageContext
|
|
163
|
+
The error context containing parameter value, type, and container information.
|
|
164
|
+
parameterName : str
|
|
165
|
+
The name of the parameter that caused the error.
|
|
166
|
+
parameterType : type[Any] | None
|
|
167
|
+
The expected type of the parameter, used in error messages.
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
errorMessage : str
|
|
172
|
+
The constructed error message string.
|
|
173
|
+
|
|
174
|
+
"""
|
|
175
|
+
messageParts: list[str] = ["I received "]
|
|
176
|
+
|
|
177
|
+
if context.parameterValue is not None and not isinstance(context.parameterValue, (bytes, bytearray, memoryview)):
|
|
178
|
+
messageParts.append(f'"{context.parameterValue}"')
|
|
179
|
+
else:
|
|
180
|
+
messageParts.append("a value")
|
|
181
|
+
|
|
182
|
+
if context.parameterValueType:
|
|
183
|
+
messageParts.append(f" of type `{context.parameterValueType}`")
|
|
184
|
+
|
|
185
|
+
if context.isElement:
|
|
186
|
+
messageParts.append(" as an element in")
|
|
187
|
+
|
|
188
|
+
if context.containerType:
|
|
189
|
+
messageParts.append(f" a `{context.containerType}` type")
|
|
190
|
+
|
|
191
|
+
messageParts.append(f" but {parameterName} must have integers")
|
|
192
|
+
|
|
193
|
+
if parameterType:
|
|
194
|
+
messageParts.append(f" in type(s) `{parameterType}`")
|
|
195
|
+
|
|
196
|
+
return "".join(messageParts)
|
|
208
197
|
|
|
209
198
|
def intInnit(listInt_Allegedly: Iterable[Any], parameterName: str | None = None, parameterType: type[Any] | None = None) -> list[int]:
|
|
210
199
|
"""Validate and convert input values to a `list` of integers.
|
|
@@ -252,7 +241,7 @@ def intInnit(listInt_Allegedly: Iterable[Any], parameterName: str | None = None,
|
|
|
252
241
|
|
|
253
242
|
# Be nice, and assume the input container is valid and every element is valid.
|
|
254
243
|
# Nevertheless, this is a "fail-early" step, so reject ambiguity and try to induce errors now that could be catastrophic later.
|
|
255
|
-
try:
|
|
244
|
+
try:
|
|
256
245
|
iter(listInt_Allegedly)
|
|
257
246
|
lengthInitial: int | None = None
|
|
258
247
|
if isinstance(listInt_Allegedly, Sized):
|
|
@@ -349,7 +338,7 @@ def oopsieKwargsie(huh: Any) -> bool | str | None:
|
|
|
349
338
|
if not isinstance(huh, str):
|
|
350
339
|
try:
|
|
351
340
|
huh = str(huh)
|
|
352
|
-
except BaseException:
|
|
341
|
+
except BaseException:
|
|
353
342
|
return huh
|
|
354
343
|
formatted: str = huh.strip().title()
|
|
355
344
|
if formatted == str(True):
|
|
@@ -108,7 +108,6 @@ def test_stringItUp(description: str, value_scrapPile: list[Any], expected: list
|
|
|
108
108
|
("Set values", ({'ne': {11, 13}, 'sw': {17}}, {'ne': {19, 23, 13, 29, 11}, 'sw': {31, 17, 37}}), {'destroyDuplicates': True, 'reorderLists': True}, {'ne': [11, 13, 19, 23, 29], 'sw': [17, 31, 37]}),
|
|
109
109
|
("NumPy arrays", ({'ne': numpy.array([11, 13]), 'sw': numpy.array([17])}, {'ne': numpy.array([19, 23, 13, 29, 11]), 'sw': numpy.array([31, 17, 37])}), {'destroyDuplicates': False, 'reorderLists': False}, {'ne': [11, 13, 19, 23, 13, 29, 11], 'sw': [17, 31, 17, 37]}),
|
|
110
110
|
("Destroy duplicates", ({'fr': [11, 13], 'jp': [17]}, {'fr': [19, 23, 13, 29, 11], 'jp': [31, 17, 37]}), {'destroyDuplicates': True, 'reorderLists': False}, {'fr': [11, 13, 19, 23, 29], 'jp': [17, 31, 37]}),
|
|
111
|
-
("Non-string keys", ({None: [13], True: [17]}, {19: [23], (29, 31): [37]}), {'destroyDuplicates': False, 'reorderLists': False}, {'None': [13], 'True': [17], '19': [23], '(29, 31)': [37]}),
|
|
112
111
|
("Reorder lists", ({'fr': [11, 13], 'jp': [17]}, {'fr': [19, 23, 13, 29, 11], 'jp': [31, 17, 37]}), {'destroyDuplicates': False, 'reorderLists': True}, {'fr': [11, 11, 13, 13, 19, 23, 29], 'jp': [17, 17, 31, 37]}),
|
|
113
112
|
("Non-iterable values", ({'ne': 13, 'sw': 17}, {'ne': 19, 'nw': 23}), {'destroyDuplicates': False, 'reorderLists': False}, TypeError),
|
|
114
113
|
("Skip erroneous types", ({'ne': [11, 13], 'sw': [17, 19]}, {'ne': 23, 'nw': 29}), {'killErroneousDataTypes': True}, {'ne': [11, 13], 'sw': [17, 19]}),
|
|
@@ -11,6 +11,8 @@ identifierDotAttribute: TypeAlias = str
|
|
|
11
11
|
`TypeAlias` for a `str` `object` using dot notation to access an attribute, such as 'scipy.signal.windows'.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
+
Limitation: TypeAlias = bool | float | int | None
|
|
15
|
+
|
|
14
16
|
class Ordinals(Protocol):
|
|
15
17
|
"""Any Python `object` `type` that may be ordered before or after a comparable `object` `type` by comparison operators."""
|
|
16
18
|
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
4
|
from collections.abc import Callable
|
|
5
|
-
from typing import Any, overload, ParamSpec, Protocol, runtime_checkable, TYPE_CHECKING,
|
|
6
|
-
from typing_extensions import Self, TypeVarTuple
|
|
5
|
+
from typing import Any, overload, ParamSpec, Protocol, runtime_checkable, TYPE_CHECKING, TypeVar
|
|
7
6
|
import sys
|
|
8
7
|
|
|
9
8
|
if TYPE_CHECKING:
|
|
10
9
|
from types import CodeType, MethodType
|
|
10
|
+
from typing import TypeAlias
|
|
11
|
+
from typing_extensions import Self, TypeVarTuple
|
|
11
12
|
|
|
12
13
|
# TODO explore the following
|
|
13
14
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hunterMakesPy
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Easy Python functions making making functional Python functions easier.
|
|
5
5
|
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
6
|
License-Expression: CC-BY-NC-4.0
|
|
@@ -9,13 +9,11 @@ Project-URL: Donate, https://www.patreon.com/integrated
|
|
|
9
9
|
Project-URL: Homepage, https://github.com/hunterhogan/hunterMakesPy
|
|
10
10
|
Project-URL: Issues, https://github.com/hunterhogan/hunterMakesPy/issues
|
|
11
11
|
Project-URL: Repository, https://github.com/hunterhogan/hunterMakesPy
|
|
12
|
-
Keywords:
|
|
12
|
+
Keywords: input validation,module loading,package settings,parameter validation
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Environment :: Console
|
|
15
15
|
Classifier: Framework :: Pytest
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
|
-
Classifier: Intended Audience :: End Users/Desktop
|
|
18
|
-
Classifier: Intended Audience :: Other Audience
|
|
19
17
|
Classifier: Natural Language :: English
|
|
20
18
|
Classifier: Operating System :: OS Independent
|
|
21
19
|
Classifier: Programming Language :: Python
|
|
@@ -27,6 +25,7 @@ Classifier: Typing :: Typed
|
|
|
27
25
|
Requires-Python: >=3.10
|
|
28
26
|
Description-Content-Type: text/markdown
|
|
29
27
|
License-File: LICENSE
|
|
28
|
+
Requires-Dist: Z0Z_tools>=2.2.1
|
|
30
29
|
Requires-Dist: autoflake
|
|
31
30
|
Requires-Dist: charset_normalizer
|
|
32
31
|
Requires-Dist: isort
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "hunterMakesPy"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.3"
|
|
4
4
|
description = "Easy Python functions making making functional Python functions easier."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
license = "CC-BY-NC-4.0"
|
|
8
8
|
authors = [{ name = "Hunter Hogan", email = "HunterHogan@pm.me" }]
|
|
9
9
|
keywords = [
|
|
10
|
-
"attribute loading",
|
|
11
|
-
"configuration",
|
|
12
|
-
"defensive programming",
|
|
13
|
-
"dictionary merging",
|
|
14
|
-
"dynamic import",
|
|
15
|
-
"file system utilities",
|
|
16
10
|
"input validation",
|
|
17
11
|
"module loading",
|
|
18
12
|
"package settings",
|
|
@@ -23,8 +17,6 @@ classifiers = [
|
|
|
23
17
|
"Environment :: Console",
|
|
24
18
|
"Framework :: Pytest",
|
|
25
19
|
"Intended Audience :: Developers",
|
|
26
|
-
"Intended Audience :: End Users/Desktop",
|
|
27
|
-
"Intended Audience :: Other Audience",
|
|
28
20
|
"Natural Language :: English",
|
|
29
21
|
"Operating System :: OS Independent",
|
|
30
22
|
"Programming Language :: Python",
|
|
@@ -35,6 +27,7 @@ classifiers = [
|
|
|
35
27
|
"Typing :: Typed",
|
|
36
28
|
]
|
|
37
29
|
dependencies = [
|
|
30
|
+
"Z0Z_tools>=2.2.1",
|
|
38
31
|
"autoflake",
|
|
39
32
|
"charset_normalizer",
|
|
40
33
|
"isort",
|
|
@@ -45,7 +38,7 @@ dependencies = [
|
|
|
45
38
|
]
|
|
46
39
|
optional-dependencies = { development = ["pytest-cov"], testing = [
|
|
47
40
|
"librosa",
|
|
48
|
-
"pytest"
|
|
41
|
+
"pytest"
|
|
49
42
|
] }
|
|
50
43
|
|
|
51
44
|
[project.urls]
|
|
@@ -66,7 +59,7 @@ run = { branch = true, data_file = "hunterMakesPy/tests/coverage/.coverage", omi
|
|
|
66
59
|
], source = ["."] }
|
|
67
60
|
|
|
68
61
|
[tool.pytest]
|
|
69
|
-
addopts = ["--color=
|
|
62
|
+
addopts = ["--color=yes"]
|
|
70
63
|
log_auto_indent = "On"
|
|
71
64
|
testpaths = ["hunterMakesPy/tests"]
|
|
72
65
|
|
|
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
|