hunterMakesPy 0.8.1__tar.gz → 0.9.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.
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/PKG-INFO +11 -6
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/README.md +6 -1
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/coping.py +0 -4
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/dataStructures.py +1 -6
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/filesystemToolkit.py +8 -38
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/parseParameters.py +6 -26
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/semiotics.py +2 -4
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy.egg-info/PKG-INFO +11 -6
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy.egg-info/requires.txt +1 -1
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/pyproject.toml +5 -5
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/LICENSE +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/__init__.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/_theSSOT.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/py.typed +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/__init__.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/conftest.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/conftestAnnex.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/test_coping.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/test_dataStructures.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/test_filesystemToolkit.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/test_parseParameters.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/tests/test_theTypes.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/theTypes.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy/theTypesCallableFunction.py +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy.egg-info/SOURCES.txt +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy.egg-info/dependency_links.txt +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/hunterMakesPy.egg-info/top_level.txt +0 -0
- {huntermakespy-0.8.1 → huntermakespy-0.9.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hunterMakesPy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
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
|
|
@@ -17,15 +17,15 @@ Classifier: Intended Audience :: Developers
|
|
|
17
17
|
Classifier: Natural Language :: English
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Classifier: Topic :: Utilities
|
|
24
24
|
Classifier: Typing :: Typed
|
|
25
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.12
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
|
-
Requires-Dist: Z0Z_tools>=
|
|
28
|
+
Requires-Dist: Z0Z_tools>=4.0.0
|
|
29
29
|
Requires-Dist: autoflake
|
|
30
30
|
Requires-Dist: charset_normalizer
|
|
31
31
|
Requires-Dist: isort
|
|
@@ -185,6 +185,11 @@ def test_my_integer_validator(test_name, test_func):
|
|
|
185
185
|
## My recovery
|
|
186
186
|
|
|
187
187
|
[](https://HunterThinks.com/support)
|
|
188
|
-
[](https://www.youtube.com/@HunterHogan)
|
|
189
188
|
|
|
190
189
|
[](https://creativecommons.org/licenses/by-nc/4.0/)
|
|
190
|
+
|
|
191
|
+
By law, authors retain their copyrights unless they grant exceptions. The [Attribution-NonCommercial 4.0 International Deed](https://github.com/hunterhogan/hunterMakesPy#License-1-ov-file) outlines how you may use this work.
|
|
192
|
+
|
|
193
|
+
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
194
|
+
|
|
195
|
+
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
@@ -143,6 +143,11 @@ def test_my_integer_validator(test_name, test_func):
|
|
|
143
143
|
## My recovery
|
|
144
144
|
|
|
145
145
|
[](https://HunterThinks.com/support)
|
|
146
|
-
[](https://www.youtube.com/@HunterHogan)
|
|
147
146
|
|
|
148
147
|
[](https://creativecommons.org/licenses/by-nc/4.0/)
|
|
148
|
+
|
|
149
|
+
By law, authors retain their copyrights unless they grant exceptions. The [Attribution-NonCommercial 4.0 International Deed](https://github.com/hunterhogan/hunterMakesPy#License-1-ov-file) outlines how you may use this work.
|
|
150
|
+
|
|
151
|
+
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
152
|
+
|
|
153
|
+
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
@@ -12,7 +12,6 @@ if TYPE_CHECKING:
|
|
|
12
12
|
from importlib.machinery import ModuleSpec
|
|
13
13
|
|
|
14
14
|
def getIdentifierPackagePACKAGING(identifierPackageFALLBACK: str) -> str:
|
|
15
|
-
#ruff: ignore[docstring-missing-returns]
|
|
16
15
|
"""Get package name from pyproject.toml or fallback to provided value."""
|
|
17
16
|
try:
|
|
18
17
|
return tomli_loads(Path('pyproject.toml').read_text(encoding='utf-8'))['project']['name']
|
|
@@ -21,7 +20,6 @@ def getIdentifierPackagePACKAGING(identifierPackageFALLBACK: str) -> str:
|
|
|
21
20
|
return identifierPackageFALLBACK
|
|
22
21
|
|
|
23
22
|
def getPathPackageINSTALLING(identifierPackage: str) -> Path:
|
|
24
|
-
#ruff: ignore[docstring-missing-returns]
|
|
25
23
|
"""Return the root directory of the installed package."""
|
|
26
24
|
try:
|
|
27
25
|
moduleSpecification: ModuleSpec | None = find_spec(identifierPackage)
|
|
@@ -68,7 +66,6 @@ class PackageSettings:
|
|
|
68
66
|
fileExtension='.pyx'
|
|
69
67
|
)
|
|
70
68
|
```
|
|
71
|
-
|
|
72
69
|
"""
|
|
73
70
|
|
|
74
71
|
identifierPackageFALLBACK: dataclasses.InitVar[str] = ''
|
|
@@ -142,7 +139,6 @@ def raiseIfNone(expression: TypeSansNone | None, errorMessage: str | None = None
|
|
|
142
139
|
Thanks
|
|
143
140
|
------
|
|
144
141
|
sobolevn, https://github.com/sobolevn, for the seed of this function. https://github.com/python/typing/discussions/1997#discussioncomment-13108399
|
|
145
|
-
|
|
146
142
|
"""
|
|
147
143
|
if expression is None:
|
|
148
144
|
message: str = errorMessage or 'A function unexpectedly returned `None`. Hint: look at the traceback immediately before `raiseIfNone`.'
|
|
@@ -36,7 +36,6 @@ if TYPE_CHECKING:
|
|
|
36
36
|
from typing import Any, Literal
|
|
37
37
|
|
|
38
38
|
def removeExtraWhitespace(string: str) -> str:
|
|
39
|
-
#ruff: ignore[docstring-missing-returns]
|
|
40
39
|
"""Remove extra whitespace from string representation of Python data structures."""
|
|
41
40
|
commas: str = regex.sub(r',\s+', ',', string)
|
|
42
41
|
bracketsOpening: str = regex.sub(r'([\[\(])\s+', r'\1', commas)
|
|
@@ -72,7 +71,6 @@ def autoDecodingRLE(arrayTarget: NDArray[integer[Any]], *, assumeAddSpaces: bool
|
|
|
72
71
|
"""
|
|
73
72
|
def sliceNDArrayToNestedLists(arraySlice: NDArray[integer[Any]]) -> Any:
|
|
74
73
|
def getLengthOption(optionAsStr: str) -> int:
|
|
75
|
-
#ruff: ignore[docstring-missing-returns]
|
|
76
74
|
"""`assumeAddSpaces` characters: `,` 1 space; `]*` 2 spaces."""
|
|
77
75
|
return assumeAddSpaces * (optionAsStr.count(',') + optionAsStr.count(']*') * 2) + len(optionAsStr)
|
|
78
76
|
|
|
@@ -161,7 +159,6 @@ def autoDecodingRLE(arrayTarget: NDArray[integer[Any]], *, assumeAddSpaces: bool
|
|
|
161
159
|
)
|
|
162
160
|
|
|
163
161
|
def replacementByContext(match: regex.Match[str]) -> str:
|
|
164
|
-
#ruff: ignore[docstring-missing-returns]
|
|
165
162
|
"""Generate replacement string based on context patterns."""
|
|
166
163
|
elephino: dict[str, str | None] = match.groupdict()
|
|
167
164
|
joinAhead: str | None = elephino.get('joinAhead') or elephino.get('joinAheadJoinAhead')
|
|
@@ -268,7 +265,7 @@ def updateExtendPolishDictionaryLists(*dictionaryLists: Mapping[文件, Iterable
|
|
|
268
265
|
the list follows the iterable's order, which may be unpredictable for sets. Strings contribute
|
|
269
266
|
individual characters, and mapping values contribute their keys.
|
|
270
267
|
|
|
271
|
-
Deduplication uses `dict.fromkeys` [1] to preserve first occurrences. Sorting uses `sorted`
|
|
268
|
+
Deduplication uses `dict.fromkeys` [1] to preserve first occurrences. Sorting uses `sorted`
|
|
272
269
|
and runs after deduplication. Every retained value becomes a list regardless of the input type.
|
|
273
270
|
|
|
274
271
|
Parameters
|
|
@@ -319,8 +316,6 @@ def updateExtendPolishDictionaryLists(*dictionaryLists: Mapping[文件, Iterable
|
|
|
319
316
|
----------
|
|
320
317
|
[1] Python dictionaries and `dict.fromkeys`.
|
|
321
318
|
https://docs.python.org/3/library/stdtypes.html#dict.fromkeys
|
|
322
|
-
[2] Python `sorted`.
|
|
323
|
-
https://docs.python.org/3/library/functions.html#sorted
|
|
324
319
|
"""
|
|
325
320
|
ePluribusUnum: dict[文件, list[文义]] = {}
|
|
326
321
|
|
|
@@ -85,23 +85,14 @@ def appendStringToHere(this: str, pathFilename: PathLike[Any] | PurePath) -> Pat
|
|
|
85
85
|
|
|
86
86
|
File Writing
|
|
87
87
|
------------
|
|
88
|
-
This function prepares parent directories with `makeDirectorySafely
|
|
89
|
-
append mode with UTF-8 encoding and `newline=''
|
|
90
|
-
without translation. This function writes and flushes the text with `writeStringToHere
|
|
88
|
+
This function prepares parent directories with `makeDirectorySafely`, then opens the file in
|
|
89
|
+
append mode with UTF-8 encoding and `newline=''`. Newline characters in `this` are written
|
|
90
|
+
without translation. This function writes and flushes the text with `writeStringToHere`.
|
|
91
91
|
Directory creation suppresses `OSError`, but errors from opening or writing the file propagate.
|
|
92
92
|
|
|
93
93
|
Examples
|
|
94
94
|
--------
|
|
95
95
|
No invocation of this function exists elsewhere in the codebase.
|
|
96
|
-
|
|
97
|
-
References
|
|
98
|
-
----------
|
|
99
|
-
[1] `makeDirectorySafely`
|
|
100
|
-
|
|
101
|
-
[2] Python `open` modes, encoding, and newline handling.
|
|
102
|
-
https://docs.python.org/3/library/functions.html#open
|
|
103
|
-
[3] `writeStringToHere`
|
|
104
|
-
|
|
105
96
|
"""
|
|
106
97
|
pathFilename = Path(pathFilename)
|
|
107
98
|
makeDirectorySafely(pathFilename)
|
|
@@ -141,8 +132,8 @@ def importPathFilename2Identifier(pathFilename: PathLike[Any] | PurePath, identi
|
|
|
141
132
|
|
|
142
133
|
You can use this function to load a Python source file as a module and retrieve a named attribute
|
|
143
134
|
from that module. This function builds a module specification with
|
|
144
|
-
`importlib.util.spec_from_file_location
|
|
145
|
-
`importlib.util.module_from_spec
|
|
135
|
+
`importlib.util.spec_from_file_location`, executes the loaded module with
|
|
136
|
+
`importlib.util.module_from_spec`, and returns the attribute selected by `identifier`.
|
|
146
137
|
|
|
147
138
|
Parameters
|
|
148
139
|
----------
|
|
@@ -166,13 +157,6 @@ def importPathFilename2Identifier(pathFilename: PathLike[Any] | PurePath, identi
|
|
|
166
157
|
Raised when the loader cannot read `pathFilename`.
|
|
167
158
|
AttributeError
|
|
168
159
|
Raised when the loaded module does not define `identifier`.
|
|
169
|
-
|
|
170
|
-
References
|
|
171
|
-
----------
|
|
172
|
-
[1] `importlib.util.spec_from_file_location`
|
|
173
|
-
https://docs.python.org/3/library/importlib.html#importlib.util.spec_from_file_location
|
|
174
|
-
[2] `importlib.util.module_from_spec`
|
|
175
|
-
https://docs.python.org/3/library/importlib.html#importlib.util.module_from_spec
|
|
176
160
|
"""
|
|
177
161
|
pathFilename = Path(pathFilename)
|
|
178
162
|
|
|
@@ -189,21 +173,14 @@ def makeDirectorySafely(pathFilename: Any) -> None:
|
|
|
189
173
|
"""Create parent directories for `pathFilename` when `pathFilename` is a filesystem path.
|
|
190
174
|
|
|
191
175
|
You can use this function to prepare an output location before a later write operation. This
|
|
192
|
-
function ignores `OSError` from `Path.mkdir`
|
|
193
|
-
`IOBase`
|
|
176
|
+
function ignores `OSError` from `Path.mkdir` and does nothing when `pathFilename` is an
|
|
177
|
+
`IOBase` stream.
|
|
194
178
|
|
|
195
179
|
Parameters
|
|
196
180
|
----------
|
|
197
181
|
pathFilename : Any
|
|
198
182
|
The target path or open stream. When `pathFilename` is not an `IOBase` instance, the
|
|
199
183
|
function creates the parent directory of `pathFilename`.
|
|
200
|
-
|
|
201
|
-
References
|
|
202
|
-
----------
|
|
203
|
-
[1] `pathlib.Path.mkdir`
|
|
204
|
-
https://docs.python.org/3/library/pathlib.html#pathlib.Path.mkdir
|
|
205
|
-
[2] `IOBase`
|
|
206
|
-
https://docs.python.org/3/library/io.html#io.IOBase
|
|
207
184
|
"""
|
|
208
185
|
if not isinstance(pathFilename, IOBase):
|
|
209
186
|
with contextlib.suppress(OSError):
|
|
@@ -296,7 +273,7 @@ def writeStringToHere(this: str, pathFilename: PathLike[Any] | PurePath | TextIO
|
|
|
296
273
|
|
|
297
274
|
You can use this function to send text to a filesystem path or an open text stream. This function
|
|
298
275
|
creates the parent directory when `pathFilename` is path-like, writes UTF-8 text with
|
|
299
|
-
`Path.write_text
|
|
276
|
+
`Path.write_text`, or writes and flushes a `TextIOBase` stream.
|
|
300
277
|
|
|
301
278
|
Parameters
|
|
302
279
|
----------
|
|
@@ -326,13 +303,6 @@ def writeStringToHere(this: str, pathFilename: PathLike[Any] | PurePath | TextIO
|
|
|
326
303
|
pathFilename.relative_to(pathTransformee)
|
|
327
304
|
)
|
|
328
305
|
```
|
|
329
|
-
|
|
330
|
-
References
|
|
331
|
-
----------
|
|
332
|
-
[1] `pathlib.Path.write_text`
|
|
333
|
-
https://docs.python.org/3/library/pathlib.html#pathlib.Path.write_text
|
|
334
|
-
[2] `TextIOBase`
|
|
335
|
-
https://docs.python.org/3/library/io.html#io.TextIOBase
|
|
336
306
|
"""
|
|
337
307
|
if isinstance(pathFilename, TextIOBase):
|
|
338
308
|
pathFilename.write(str(this))
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
You can use this module to convert integer-compatible inputs into lists of integers, calculate
|
|
7
7
|
worker counts from absolute or fractional limits, and interpret strings as `True`, `False`, or
|
|
8
8
|
`None`. Integer validation reports incompatible values with context about the caller's parameter.
|
|
9
|
-
Worker-count calculation uses the system CPU count from `multiprocessing`
|
|
10
|
-
accepts numeric strings. Binary integer inputs use `charset_normalizer`
|
|
9
|
+
Worker-count calculation uses the system CPU count from `multiprocessing` by default and also
|
|
10
|
+
accepts numeric strings. Binary integer inputs use `charset_normalizer` for text decoding.
|
|
11
11
|
|
|
12
12
|
Contents
|
|
13
13
|
--------
|
|
@@ -22,14 +22,6 @@ Functions
|
|
|
22
22
|
Classes
|
|
23
23
|
ErrorMessageContext
|
|
24
24
|
Store value, type, and container information for integer-validation error messages.
|
|
25
|
-
|
|
26
|
-
References
|
|
27
|
-
----------
|
|
28
|
-
[1] Python `multiprocessing`.
|
|
29
|
-
https://docs.python.org/3/library/multiprocessing.html
|
|
30
|
-
[2] charset-normalizer.
|
|
31
|
-
https://github.com/Ousret/charset_normalizer
|
|
32
|
-
|
|
33
25
|
"""
|
|
34
26
|
from __future__ import annotations
|
|
35
27
|
|
|
@@ -78,14 +70,14 @@ def defineConcurrencyLimit(*, limit: ConcurrencyLimit, cpuTotal: int = multiproc
|
|
|
78
70
|
|
|
79
71
|
String Parsing
|
|
80
72
|
--------------
|
|
81
|
-
This function first uses `oopsieKwargsie`
|
|
73
|
+
This function first uses `oopsieKwargsie` to interpret strings representing `True`, `False`,
|
|
82
74
|
or `None`, ignoring capitalization and surrounding whitespace. Other strings are converted
|
|
83
75
|
with `float`. An invalid numeric string raises `ValueError` with the conversion error as the cause.
|
|
84
76
|
|
|
85
77
|
Processor Counts
|
|
86
78
|
----------------
|
|
87
79
|
This function rounds floating-point counts whose absolute value is at least one before applying
|
|
88
|
-
the count rules. Rounding uses Python `round
|
|
80
|
+
the count rules. Rounding uses Python `round`, including rounding ties to the nearest even
|
|
89
81
|
integer. This function applies the following rules before enforcing the platform bounds.
|
|
90
82
|
|
|
91
83
|
- `None`, `False`, or zero select `cpuTotal`.
|
|
@@ -96,7 +88,7 @@ def defineConcurrencyLimit(*, limit: ConcurrencyLimit, cpuTotal: int = multiproc
|
|
|
96
88
|
- A negative count of at most negative one reserves `abs(int(limit))` CPUs.
|
|
97
89
|
|
|
98
90
|
This function caps the result at 61 on Windows, matching the restriction for
|
|
99
|
-
`concurrent.futures.ProcessPoolExecutor
|
|
91
|
+
`concurrent.futures.ProcessPoolExecutor`. This function then enforces the minimum of one.
|
|
100
92
|
|
|
101
93
|
Parameters
|
|
102
94
|
----------
|
|
@@ -107,7 +99,7 @@ def defineConcurrencyLimit(*, limit: ConcurrencyLimit, cpuTotal: int = multiproc
|
|
|
107
99
|
Strings are also accepted at runtime, although the type annotation excludes strings.
|
|
108
100
|
cpuTotal : int = multiprocessing.cpu_count()
|
|
109
101
|
The CPU count used for fractional limits and reserved-CPU calculations. The default is the
|
|
110
|
-
value of `multiprocessing.cpu_count`
|
|
102
|
+
value of `multiprocessing.cpu_count` evaluated when this module is imported.
|
|
111
103
|
|
|
112
104
|
Returns
|
|
113
105
|
-------
|
|
@@ -129,17 +121,6 @@ def defineConcurrencyLimit(*, limit: ConcurrencyLimit, cpuTotal: int = multiproc
|
|
|
129
121
|
|
|
130
122
|
workers = defineConcurrencyLimit(limit=0.75)
|
|
131
123
|
```
|
|
132
|
-
|
|
133
|
-
References
|
|
134
|
-
----------
|
|
135
|
-
[1] `oopsieKwargsie`
|
|
136
|
-
|
|
137
|
-
[2] Python `round`.
|
|
138
|
-
https://docs.python.org/3/library/functions.html#round
|
|
139
|
-
[3] Python `concurrent.futures.ProcessPoolExecutor`.
|
|
140
|
-
https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor
|
|
141
|
-
[4] Python `multiprocessing.cpu_count`.
|
|
142
|
-
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.cpu_count
|
|
143
124
|
"""
|
|
144
125
|
if isinstance(limit, str):
|
|
145
126
|
limitFromString: bool | str | None = oopsieKwargsie(limit)
|
|
@@ -196,7 +177,6 @@ def _constructErrorMessage(context: ErrorMessageContext, parameterName: str, par
|
|
|
196
177
|
-------
|
|
197
178
|
errorMessage : str
|
|
198
179
|
The constructed error message string.
|
|
199
|
-
|
|
200
180
|
"""
|
|
201
181
|
messageParts: list[str] = ["I received "]
|
|
202
182
|
|
|
@@ -117,7 +117,7 @@ expects negative error indicators. The leetspeak encoding makes `errorL33T` imme
|
|
|
117
117
|
in debugger output, log files, or printed state, reducing the risk of overlooking error conditions
|
|
118
118
|
that might be missed with generic values like `-1`.
|
|
119
119
|
|
|
120
|
-
In rare cases when code execution does not raise `Exception`
|
|
120
|
+
In rare cases when code execution does not raise `Exception` but produces incorrect output,
|
|
121
121
|
seeing `31212012` or `-31212012` in the output provides a stronger diagnostic signal than `-1` or
|
|
122
122
|
other conventional error values. The distinctive value helps identify which variables hold error
|
|
123
123
|
states without requiring careful inspection of every numeric field.
|
|
@@ -150,9 +150,6 @@ References
|
|
|
150
150
|
----------
|
|
151
151
|
[1] Leet - Wikipedia
|
|
152
152
|
https://en.wikipedia.org/wiki/Leet
|
|
153
|
-
[2] Built-in Exceptions - `Exception` (Python documentation)
|
|
154
|
-
https://docs.python.org/3/library/exceptions.html#Exception
|
|
155
|
-
|
|
156
153
|
"""
|
|
157
154
|
|
|
158
155
|
inclusive: Final[int] = 1
|
|
@@ -323,6 +320,7 @@ References
|
|
|
323
320
|
|
|
324
321
|
"""
|
|
325
322
|
|
|
323
|
+
# TODO Can I use Python's color system? It is shockingly similar in structure and even identifiers.
|
|
326
324
|
#======== Some colors for printing text to the terminal. ========
|
|
327
325
|
# Many values and options at https://gist.github.com/JBlond/2fea43a3049b38287e5e9cefc87b2124
|
|
328
326
|
# Many, many, many options at https://stackoverflow.com/a/33206814/4403878
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hunterMakesPy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
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
|
|
@@ -17,15 +17,15 @@ Classifier: Intended Audience :: Developers
|
|
|
17
17
|
Classifier: Natural Language :: English
|
|
18
18
|
Classifier: Operating System :: OS Independent
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Classifier: Topic :: Utilities
|
|
24
24
|
Classifier: Typing :: Typed
|
|
25
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.12
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
|
-
Requires-Dist: Z0Z_tools>=
|
|
28
|
+
Requires-Dist: Z0Z_tools>=4.0.0
|
|
29
29
|
Requires-Dist: autoflake
|
|
30
30
|
Requires-Dist: charset_normalizer
|
|
31
31
|
Requires-Dist: isort
|
|
@@ -185,6 +185,11 @@ def test_my_integer_validator(test_name, test_func):
|
|
|
185
185
|
## My recovery
|
|
186
186
|
|
|
187
187
|
[](https://HunterThinks.com/support)
|
|
188
|
-
[](https://www.youtube.com/@HunterHogan)
|
|
189
188
|
|
|
190
189
|
[](https://creativecommons.org/licenses/by-nc/4.0/)
|
|
190
|
+
|
|
191
|
+
By law, authors retain their copyrights unless they grant exceptions. The [Attribution-NonCommercial 4.0 International Deed](https://github.com/hunterhogan/hunterMakesPy#License-1-ov-file) outlines how you may use this work.
|
|
192
|
+
|
|
193
|
+
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
194
|
+
|
|
195
|
+
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "hunterMakesPy"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
description = "Easy Python functions making making functional Python functions easier."
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
7
|
license = "CC-BY-NC-4.0"
|
|
8
8
|
authors = [{ name = "Hunter Hogan", email = "HunterHogan@pm.me" }]
|
|
9
9
|
keywords = [
|
|
@@ -20,14 +20,14 @@ classifiers = [
|
|
|
20
20
|
"Natural Language :: English",
|
|
21
21
|
"Operating System :: OS Independent",
|
|
22
22
|
"Programming Language :: Python",
|
|
23
|
-
"Programming Language :: Python :: 3.
|
|
24
|
-
"Programming Language :: Python :: 3.
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.15",
|
|
25
25
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
26
26
|
"Topic :: Utilities",
|
|
27
27
|
"Typing :: Typed",
|
|
28
28
|
]
|
|
29
29
|
dependencies = [
|
|
30
|
-
"Z0Z_tools>=
|
|
30
|
+
"Z0Z_tools>=4.0.0",
|
|
31
31
|
"autoflake",
|
|
32
32
|
"charset_normalizer",
|
|
33
33
|
"isort",
|
|
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
|