hunterMakesPy 0.10.1__tar.gz → 0.10.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.
Files changed (40) hide show
  1. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/PKG-INFO +7 -11
  2. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/README.md +6 -4
  3. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/kitFilesystem.py +7 -10
  4. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/test_kitFilesystem.py +20 -20
  5. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy.egg-info/PKG-INFO +7 -11
  6. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy.egg-info/requires.txt +0 -8
  7. huntermakespy-0.10.2/pyproject.toml +285 -0
  8. huntermakespy-0.10.1/pyproject.toml +0 -81
  9. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/LICENSE +0 -0
  10. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/__init__.py +0 -0
  11. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/_theSSOT.py +0 -0
  12. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/coping.py +0 -0
  13. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/dataStructures.py +0 -0
  14. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/parseParameters.py +0 -0
  15. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/py.typed +0 -0
  16. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/semiotics.py +0 -0
  17. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/__init__.py +0 -0
  18. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/conftest.py +0 -0
  19. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/conftestAnnex.py +0 -0
  20. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/__init__.py +0 -0
  21. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/arrays.py +0 -0
  22. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/arraysRLE.py +0 -0
  23. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/callables.py +0 -0
  24. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/classes.py +0 -0
  25. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/containers.py +0 -0
  26. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/messages.py +0 -0
  27. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/packages.py +0 -0
  28. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/pyprojects.py +0 -0
  29. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/pythonSource.py +0 -0
  30. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/dataSamples/text.py +0 -0
  31. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/test_conftestAnnex.py +0 -0
  32. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/test_coping.py +0 -0
  33. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/test_dataStructures.py +0 -0
  34. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/test_parseParameters.py +0 -0
  35. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/tests/test_theTypes.py +0 -0
  36. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy/theTypes.py +0 -0
  37. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy.egg-info/SOURCES.txt +0 -0
  38. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy.egg-info/dependency_links.txt +0 -0
  39. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/hunterMakesPy.egg-info/top_level.txt +0 -0
  40. {huntermakespy-0.10.1 → huntermakespy-0.10.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hunterMakesPy
3
- Version: 0.10.1
3
+ Version: 0.10.2
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
@@ -32,14 +32,9 @@ Requires-Dist: isort
32
32
  Requires-Dist: more_itertools
33
33
  Requires-Dist: numpy>=2.0
34
34
  Requires-Dist: typing_extensions>=4.10.0
35
- Provides-Extra: development
36
- Requires-Dist: pytest-cov; extra == "development"
37
- Provides-Extra: testing
38
- Requires-Dist: hypothesis; extra == "testing"
39
- Requires-Dist: pytest>=9.0; extra == "testing"
40
- Requires-Dist: pytest-xdist; extra == "testing"
41
35
  Dynamic: license-file
42
36
 
37
+ <!-- path-sync copy -n hunterhogan -->
43
38
  # hunterMakesPy
44
39
 
45
40
  Utilities for converting mixed input to integers, calculating CPU limits, handling None values, importing code dynamically, and manipulating nested data.
@@ -181,14 +176,15 @@ from hunterMakesPy.tests import assertEqualTo
181
176
  assertEqualTo(intInnit(["8080", 443]), [8080, 443], intInnit.__name__, ["8080", 443])
182
177
  ```
183
178
 
179
+ <!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
184
180
  ## My recovery
185
181
 
186
- [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
182
+ [![2011 August: Homeless since](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
183
+ ![License: CC BY-NC 4.0](https://img.shields.io/badge/license-CC%20BY--NC%204.0-blue.svg)
187
184
 
188
- [![CC-BY-NC-4.0](https://raw.githubusercontent.com/hunterhogan/hunterMakesPy/refs/heads/main/.github/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
189
-
190
- 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.
185
+ By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
191
186
 
192
187
  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.
193
188
 
194
189
  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.
190
+ <!-- === OK_EDIT: path-sync hunterhogan === -->
@@ -1,3 +1,4 @@
1
+ <!-- path-sync copy -n hunterhogan -->
1
2
  # hunterMakesPy
2
3
 
3
4
  Utilities for converting mixed input to integers, calculating CPU limits, handling None values, importing code dynamically, and manipulating nested data.
@@ -139,14 +140,15 @@ from hunterMakesPy.tests import assertEqualTo
139
140
  assertEqualTo(intInnit(["8080", 443]), [8080, 443], intInnit.__name__, ["8080", 443])
140
141
  ```
141
142
 
143
+ <!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
142
144
  ## My recovery
143
145
 
144
- [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
146
+ [![2011 August: Homeless since](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
147
+ ![License: CC BY-NC 4.0](https://img.shields.io/badge/license-CC%20BY--NC%204.0-blue.svg)
145
148
 
146
- [![CC-BY-NC-4.0](https://raw.githubusercontent.com/hunterhogan/hunterMakesPy/refs/heads/main/.github/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
147
-
148
- 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.
149
+ By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
149
150
 
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.
151
152
 
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.
154
+ <!-- === OK_EDIT: path-sync hunterhogan === -->
@@ -279,9 +279,8 @@ def writePython(pythonSource: str, pathFilename: PathLike[Any] | PurePath | Text
279
279
 
280
280
  You can use this function to normalize Python imports and then send the resulting source code to a
281
281
  file path or open text stream. `autoflake` [1] removes unused imports, `isort` [2] sorts the
282
- remaining imports, and `pathFilename` receives the formatted source code followed by a newline.
283
- When the formatted source code already ends with a newline, the written text ends with a blank
284
- line.
282
+ remaining imports, and `pathFilename` receives the formatted source code ending with exactly one
283
+ line feed: trailing line feeds are removed and one is added.
285
284
 
286
285
  Parameters
287
286
  ----------
@@ -337,7 +336,7 @@ def writePython(pythonSource: str, pathFilename: PathLike[Any] | PurePath | Text
337
336
 
338
337
  settings_isort: dict[str, Any] = settings.get('isort', settings_isortDEFAULT)
339
338
  pythonSource = isort_code(pythonSource, **settings_isort)
340
- return writeStringToHere(pythonSource + '\n', pathFilename)
339
+ return writeStringToHere(pythonSource.rstrip('\n') + '\n', pathFilename)
341
340
 
342
341
  @overload
343
342
  def writeStringToHere(this: str, pathFilename: PathLike[Any] | PurePath) -> Path: ...
@@ -374,11 +373,9 @@ def writeStringToHere(this: str, pathFilename: PathLike[Any] | PurePath | TextIO
374
373
 
375
374
  File Replacement
376
375
  ----------------
377
- A path destination replaces any existing file. Each line feed in `this` becomes the newline
378
- sequence of the operating system, so a file written on Windows contains a carriage return and a
379
- line feed at the end of each line. A text stream receives `this` without this change by this
380
- function. A failure to create a parent
381
- directory is silent, but a failure to write the file raises the corresponding `OSError`.
376
+ A path destination replaces any existing file. Newline characters in `this` are written without
377
+ translation, so a line feed remains a line feed on every operating system. A failure to create a
378
+ parent directory is silent, but a failure to write the file raises the corresponding `OSError`.
382
379
 
383
380
  Examples
384
381
  --------
@@ -398,5 +395,5 @@ def writeStringToHere(this: str, pathFilename: PathLike[Any] | PurePath | TextIO
398
395
  pathFilename = Path(pathFilename)
399
396
  makeDirectorySafely(pathFilename)
400
397
  #pyrefly: ignore[unnecessary-type-conversion] #=SIN= Insurance.
401
- pathFilename.write_text(str(this), encoding='utf-8')
398
+ pathFilename.write_text(str(this), encoding='utf-8', newline='')
402
399
  return pathFilename
@@ -28,37 +28,37 @@ markParametrizeTexts: pytest.MarkDecorator = pytest.mark.parametrize('this', (
28
28
  ))
29
29
 
30
30
  markParametrizeWritePython: pytest.MarkDecorator = pytest.mark.parametrize('pythonSource, settings, expected', (
31
- pytest.param(sourceImportsUnused, None, '\nfibonacci = 13\n\n', id='sourceImportsUnused-None'),
32
- pytest.param(sourceImportsUnused, {}, '\nfibonacci = 13\n\n', id='sourceImportsUnused-settingsEmpty'),
33
- pytest.param(sourceImportsUnused, (settingsAutoflakeKeepImports := {'autoflake': {'remove_all_unused_imports': False}}), '\nfibonacci = 13\n\n', id='sourceImportsUnused-settingsAutoflakeKeepImports'),
34
- pytest.param(sourceImportsUnused, (settingsIsortDefaultProfile := {'isort': dict[str, Any]()}), '\nfibonacci = 13\n\n', id='sourceImportsUnused-settingsIsortDefaultProfile'),
35
- pytest.param(sourceImportsUnused, (settingsFormatters := settingsAutoflakeKeepImports | settingsIsortDefaultProfile), '\nfibonacci = 13\n\n', id='sourceImportsUnused-settingsFormatters'),
36
- pytest.param(sourceImportsUsed, None, sourceImportsUsed + '\n', id='sourceImportsUsed-None'),
37
- pytest.param(sourceImportsUsed, {}, sourceImportsUsed + '\n', id='sourceImportsUsed-settingsEmpty'),
38
- pytest.param(sourceImportsUsed, settingsAutoflakeKeepImports, sourceImportsUsed + '\n', id='sourceImportsUsed-settingsAutoflakeKeepImports'),
39
- pytest.param(sourceImportsUsed, settingsIsortDefaultProfile, sourceImportsUsed + '\n', id='sourceImportsUsed-settingsIsortDefaultProfile'),
40
- pytest.param(sourceImportsUsed, settingsFormatters, sourceImportsUsed + '\n', id='sourceImportsUsed-settingsFormatters'),
41
- pytest.param(sourceImportsUnusedThirdParty, None, '\nfibonacci = 21\n\n', id='sourceImportsUnusedThirdParty-None'),
42
- pytest.param(sourceImportsUnusedThirdParty, {}, '\nfibonacci = 21\n\n', id='sourceImportsUnusedThirdParty-settingsEmpty'),
43
- pytest.param(sourceImportsUnusedThirdParty, settingsAutoflakeKeepImports, 'import numpy\n\nfibonacci = 21\n\n', id='sourceImportsUnusedThirdParty-settingsAutoflakeKeepImports'),
44
- pytest.param(sourceImportsUnusedThirdParty, settingsIsortDefaultProfile, '\nfibonacci = 21\n\n', id='sourceImportsUnusedThirdParty-settingsIsortDefaultProfile'),
45
- pytest.param(sourceImportsUnusedThirdParty, settingsFormatters, 'import numpy\n\nfibonacci = 21\n\n', id='sourceImportsUnusedThirdParty-settingsFormatters'),
31
+ pytest.param(sourceImportsUnused, None, '\nfibonacci = 13\n', id='sourceImportsUnused-None'),
32
+ pytest.param(sourceImportsUnused, {}, '\nfibonacci = 13\n', id='sourceImportsUnused-settingsEmpty'),
33
+ pytest.param(sourceImportsUnused, (settingsAutoflakeKeepImports := {'autoflake': {'remove_all_unused_imports': False}}), '\nfibonacci = 13\n', id='sourceImportsUnused-settingsAutoflakeKeepImports'),
34
+ pytest.param(sourceImportsUnused, (settingsIsortDefaultProfile := {'isort': dict[str, Any]()}), '\nfibonacci = 13\n', id='sourceImportsUnused-settingsIsortDefaultProfile'),
35
+ pytest.param(sourceImportsUnused, (settingsFormatters := settingsAutoflakeKeepImports | settingsIsortDefaultProfile), '\nfibonacci = 13\n', id='sourceImportsUnused-settingsFormatters'),
36
+ pytest.param(sourceImportsUsed, None, sourceImportsUsed, id='sourceImportsUsed-None'),
37
+ pytest.param(sourceImportsUsed, {}, sourceImportsUsed, id='sourceImportsUsed-settingsEmpty'),
38
+ pytest.param(sourceImportsUsed, settingsAutoflakeKeepImports, sourceImportsUsed, id='sourceImportsUsed-settingsAutoflakeKeepImports'),
39
+ pytest.param(sourceImportsUsed, settingsIsortDefaultProfile, sourceImportsUsed, id='sourceImportsUsed-settingsIsortDefaultProfile'),
40
+ pytest.param(sourceImportsUsed, settingsFormatters, sourceImportsUsed, id='sourceImportsUsed-settingsFormatters'),
41
+ pytest.param(sourceImportsUnusedThirdParty, None, '\nfibonacci = 21\n', id='sourceImportsUnusedThirdParty-None'),
42
+ pytest.param(sourceImportsUnusedThirdParty, {}, '\nfibonacci = 21\n', id='sourceImportsUnusedThirdParty-settingsEmpty'),
43
+ pytest.param(sourceImportsUnusedThirdParty, settingsAutoflakeKeepImports, 'import numpy\n\nfibonacci = 21\n', id='sourceImportsUnusedThirdParty-settingsAutoflakeKeepImports'),
44
+ pytest.param(sourceImportsUnusedThirdParty, settingsIsortDefaultProfile, '\nfibonacci = 21\n', id='sourceImportsUnusedThirdParty-settingsIsortDefaultProfile'),
45
+ pytest.param(sourceImportsUnusedThirdParty, settingsFormatters, 'import numpy\n\nfibonacci = 21\n', id='sourceImportsUnusedThirdParty-settingsFormatters'),
46
46
  pytest.param(sourceImportsUnsorted, None, (sourceIsortProject := (
47
47
  "from pathlib import PurePosixPath\nimport collections\nimport math\n\n"
48
- "primes = collections.Counter([2, 3, 3, 5])\nnorth = PurePosixPath('north')\ntau = math.tau\n\n"
48
+ "primes = collections.Counter([2, 3, 3, 5])\nnorth = PurePosixPath('north')\ntau = math.tau\n"
49
49
  )), id='sourceImportsUnsorted-None'),
50
50
  pytest.param(sourceImportsUnsorted, {}, sourceIsortProject, id='sourceImportsUnsorted-settingsEmpty'),
51
51
  pytest.param(sourceImportsUnsorted, settingsAutoflakeKeepImports, sourceIsortProject, id='sourceImportsUnsorted-settingsAutoflakeKeepImports'),
52
52
  pytest.param(sourceImportsUnsorted, settingsIsortDefaultProfile, (sourceIsortDefault := (
53
53
  "import collections\nimport math\nfrom pathlib import PurePosixPath\n\n"
54
- "primes = collections.Counter([2, 3, 3, 5])\nnorth = PurePosixPath('north')\ntau = math.tau\n\n"
54
+ "primes = collections.Counter([2, 3, 3, 5])\nnorth = PurePosixPath('north')\ntau = math.tau\n"
55
55
  )), id='sourceImportsUnsorted-settingsIsortDefaultProfile'),
56
56
  pytest.param(sourceImportsUnsorted, settingsFormatters, sourceIsortDefault, id='sourceImportsUnsorted-settingsFormatters'),
57
57
  ))
58
58
  """Reference: the docstring of `writePython`, and the documentation of autoflake and isort.
59
59
 
60
60
  autoflake removes an unused standard-library import even when `remove_all_unused_imports` is `False`. Each formatter reads
61
- only its own settings, and `writePython` appends a newline to the formatted source.
61
+ only its own settings, and `writePython` ends the formatted source with exactly one line feed.
62
62
  """
63
63
 
64
64
  @markParametrizeTexts
@@ -146,7 +146,7 @@ def test_makeDirectorySafelyStream(pathFilename: io.BytesIO | io.StringIO, expec
146
146
  def test_writePython(tmp_path: Path, pythonSource: str, settings: dict[str, dict[str, Any]] | None, expected: str) -> None:
147
147
  pathFilename: Path = tmp_path / 'north' / 'moduleWritten.py'
148
148
  assertEqualTo(writePython(pythonSource, pathFilename, settings), pathFilename, writePython.__name__, pythonSource, pathFilename, settings)
149
- assertEqualTo(pathFilename.read_text(encoding='utf-8'), expected, writePython.__name__, pythonSource, pathFilename, settings)
149
+ assertEqualTo(pathFilename.read_bytes(), expected.encode('utf-8'), writePython.__name__, pythonSource, pathFilename, settings)
150
150
 
151
151
  @markParametrizeWritePython
152
152
  def test_writePythonStream(pythonSource: str, settings: dict[str, dict[str, Any]] | None, expected: str) -> None:
@@ -158,7 +158,7 @@ def test_writePythonStream(pythonSource: str, settings: dict[str, dict[str, Any]
158
158
  def test_writeStringToHere(tmp_path: Path, this: str) -> None:
159
159
  pathFilename: Path = tmp_path / 'north' / 'east' / 'written.txt'
160
160
  assertEqualTo(writeStringToHere(this, pathFilename), pathFilename, writeStringToHere.__name__, this, pathFilename)
161
- assertEqualTo(pathFilename.read_text(encoding='utf-8'), this, writeStringToHere.__name__, this, pathFilename)
161
+ assertEqualTo(pathFilename.read_bytes(), this.encode('utf-8'), writeStringToHere.__name__, this, pathFilename)
162
162
 
163
163
  @markParametrizeTexts
164
164
  def test_writeStringToHereStream(this: str) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hunterMakesPy
3
- Version: 0.10.1
3
+ Version: 0.10.2
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
@@ -32,14 +32,9 @@ Requires-Dist: isort
32
32
  Requires-Dist: more_itertools
33
33
  Requires-Dist: numpy>=2.0
34
34
  Requires-Dist: typing_extensions>=4.10.0
35
- Provides-Extra: development
36
- Requires-Dist: pytest-cov; extra == "development"
37
- Provides-Extra: testing
38
- Requires-Dist: hypothesis; extra == "testing"
39
- Requires-Dist: pytest>=9.0; extra == "testing"
40
- Requires-Dist: pytest-xdist; extra == "testing"
41
35
  Dynamic: license-file
42
36
 
37
+ <!-- path-sync copy -n hunterhogan -->
43
38
  # hunterMakesPy
44
39
 
45
40
  Utilities for converting mixed input to integers, calculating CPU limits, handling None values, importing code dynamically, and manipulating nested data.
@@ -181,14 +176,15 @@ from hunterMakesPy.tests import assertEqualTo
181
176
  assertEqualTo(intInnit(["8080", 443]), [8080, 443], intInnit.__name__, ["8080", 443])
182
177
  ```
183
178
 
179
+ <!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
184
180
  ## My recovery
185
181
 
186
- [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
182
+ [![2011 August: Homeless since](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
183
+ ![License: CC BY-NC 4.0](https://img.shields.io/badge/license-CC%20BY--NC%204.0-blue.svg)
187
184
 
188
- [![CC-BY-NC-4.0](https://raw.githubusercontent.com/hunterhogan/hunterMakesPy/refs/heads/main/.github/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
189
-
190
- 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.
185
+ By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
191
186
 
192
187
  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.
193
188
 
194
189
  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.
190
+ <!-- === OK_EDIT: path-sync hunterhogan === -->
@@ -5,11 +5,3 @@ isort
5
5
  more_itertools
6
6
  numpy>=2.0
7
7
  typing_extensions>=4.10.0
8
-
9
- [development]
10
- pytest-cov
11
-
12
- [testing]
13
- hypothesis
14
- pytest>=9.0
15
- pytest-xdist
@@ -0,0 +1,285 @@
1
+ # path-sync copy -n hunterhogan
2
+ [project]
3
+ name = "hunterMakesPy"
4
+ version = "0.10.2"
5
+ description = "Easy Python functions making making functional Python functions easier."
6
+ readme = "README.md"
7
+ requires-python = ">=3.12"
8
+ license = "CC-BY-NC-4.0"
9
+ authors = [{ name = "Hunter Hogan", email = "HunterHogan@pm.me" }]
10
+ keywords = [
11
+ "input validation",
12
+ "module loading",
13
+ "package settings",
14
+ "parameter validation",
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Environment :: Console",
19
+ "Framework :: Pytest",
20
+ "Intended Audience :: Developers",
21
+ "Natural Language :: English",
22
+ "Operating System :: OS Independent",
23
+ "Programming Language :: Python",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.15",
26
+ "Topic :: Software Development :: Libraries :: Python Modules",
27
+ "Topic :: Utilities",
28
+ "Typing :: Typed",
29
+ ]
30
+ dependencies = ["Z0Z_tools>=4.1.1", "autoflake", "charset_normalizer", "isort", "more_itertools", "numpy>=2.0", "typing_extensions>=4.10.0"]
31
+
32
+ [project.urls]
33
+ Documentation = "https://context7.com/hunterhogan/huntermakespy"
34
+ Donate = "https://www.patreon.com/integrated"
35
+ Homepage = "https://github.com/hunterhogan/hunterMakesPy"
36
+ Issues = "https://github.com/hunterhogan/hunterMakesPy/issues"
37
+ Repository = "https://github.com/hunterhogan/hunterMakesPy"
38
+
39
+ [dependency-groups]
40
+ development = ["pytest-cov", { include-group = "testing" }]
41
+ testing = ["hypothesis", "pytest>=9.0", "pytest-xdist"]
42
+
43
+ [build-system]
44
+ requires = ["setuptools>=77.0.1"]
45
+ build-backend = "setuptools.build_meta"
46
+
47
+ [tool.coverage]
48
+ report = { exclude_also = [
49
+ "@overload",
50
+ "^\\s*\\.\\.\\.$",
51
+ "if __name__ == \"__main__\":",
52
+ "if TYPE_CHECKING:",
53
+ ], ignore_errors = false }
54
+ run = { branch = true, data_file = "hunterMakesPy/tests/coverage/.coverage", omit = ["hunterMakesPy/tests/*"], source = ["."] }
55
+
56
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
57
+ [tool.isort]
58
+ add_imports = ["from __future__ import annotations"]
59
+ append_only = true
60
+ atomic = true
61
+ combine_as_imports = true
62
+ extend_skip_glob = ["*.pyi"]
63
+ filter_files = true
64
+ force_alphabetical_sort_within_sections = true
65
+ from_first = true
66
+ honor_noqa = true
67
+ indent = "\t"
68
+ line_length = 140
69
+ lines_after_imports = 1
70
+ lines_between_types = 0
71
+ multi_line_output = 4
72
+ no_sections = true
73
+ skip_gitignore = true
74
+ use_parentheses = true
75
+ # === OK_EDIT: path-sync hunterhogan ===
76
+
77
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
78
+ [tool.pyrefly]
79
+ enabled-ignores = ["pyrefly"]
80
+ # ignore-errors-in-generated-code = true
81
+ infer-with-first-use = false
82
+ preset = "strict"
83
+ python-platform = "all"
84
+ # === OK_EDIT: path-sync hunterhogan ===
85
+
86
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
87
+ [tool.pyrefly.errors]
88
+ bad-return = "warn"
89
+ invalid-yield = "warn"
90
+ # === OK_EDIT: path-sync hunterhogan ===
91
+
92
+ [tool.pytest]
93
+ addopts = ["--color=yes"]
94
+ empty_parameter_set_mark = "fail_at_collect"
95
+ filterwarnings = ["error"]
96
+ log_auto_indent = "On"
97
+ minversion = "9.0"
98
+ strict = true
99
+ testpaths = ["hunterMakesPy/tests"]
100
+
101
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
102
+ [tool.ruff]
103
+ line-length = 140
104
+ # === OK_EDIT: path-sync hunterhogan ===
105
+
106
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
107
+ [tool.ruff.lint]
108
+ allowed-confusables = ["–", "’", "′", "×", "−", "∖", "∗", "∣", "∨", "∪", "∼", "⊗", "ℂ", "ℋ", "ℒ", "ℓ", "ℕ", "ℙ", "ℚ", "ℝ", "ℤ", "ℰ", "ℱ", "𝒪", "𝒮", "𝔼", "𝕀", "𝟙", "α", "Β", "γ", "ι", "Κ", "ν", "ο", "ρ", "σ"]
109
+ future-annotations = true
110
+ ignore = [
111
+ # ====== Linters ===========
112
+ "FIX", # flake8-fixme
113
+ "I", # isort
114
+ "N", # pep8-naming
115
+ "TD", # flake8-todos
116
+ # ====== complexity ========
117
+ "dict-index-missing-items",
118
+ "explicit-f-string-type-conversion",
119
+ "non-pep695-type-alias",
120
+ "redundant-numeric-union",
121
+ "static-join-to-f-string",
122
+ "unnecessary-literal-dict",
123
+ "useless-import-alias",
124
+ # ====== correctness =======
125
+ "unused-variable",
126
+ # ====== formatting ========
127
+ "bad-quotes-inline-string",
128
+ "blank-lines-after-function-or-class",
129
+ "blank-lines-top-level",
130
+ "docstring-tab-indentation",
131
+ "incorrect-blank-line-after-class",
132
+ "line-too-long",
133
+ "missing-newline-at-end-of-file",
134
+ "missing-trailing-comma",
135
+ "no-space-after-block-comment",
136
+ "tab-indentation",
137
+ "too-many-blank-lines",
138
+ # ====== pedantic ==========
139
+ "any-type",
140
+ "blanket-noqa",
141
+ "docstring-in-stub",
142
+ "docstring-missing-exception",
143
+ "docstring-missing-returns",
144
+ "docstring-missing-yields",
145
+ "if-else-block-instead-of-if-exp",
146
+ "incorrect-section-order",
147
+ "magic-value-comparison",
148
+ "missing-copyright-notice",
149
+ "missing-trailing-period",
150
+ "non-ascii-import-name",
151
+ "non-ascii-name",
152
+ "non-imperative-mood",
153
+ "redefined-loop-name",
154
+ "superfluous-else-continue",
155
+ "superfluous-else-return",
156
+ "too-many-arguments",
157
+ "too-many-branches",
158
+ "too-many-locals",
159
+ "too-many-nested-blocks",
160
+ "too-many-positional-arguments",
161
+ "too-many-public-methods",
162
+ "too-many-statements",
163
+ "typed-argument-default-in-stub",
164
+ "yoda-conditions",
165
+ # ====== restriction =======
166
+ "complex-structure",
167
+ # ====== security ==========
168
+ "subprocess-without-shell-equals-true",
169
+ "suspicious-pickle-import",
170
+ # ====== style =============
171
+ "snake-case-type-alias",
172
+ "type-name-incorrect-variance",
173
+ # ====== suspicious ========
174
+ "self-or-cls-assignment",
175
+ "subclass-builtin",
176
+ "unused-import",
177
+ "useless-else-on-loop",
178
+ ]
179
+ preview = true
180
+ select = ["ALL"]
181
+ extend-select = ["missing-terminal-punctuation", "undocumented-param", "undocumented-public-init"]
182
+ task-tags = ["DEVELOPMENT", "FailEarly", "NOTE", "SEMIOTICS", "TODO"]
183
+ # === OK_EDIT: path-sync hunterhogan ===
184
+
185
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
186
+ [tool.ruff.lint.flake8-comprehensions]
187
+ allow-dict-calls-with-keyword-arguments = true
188
+ # === OK_EDIT: path-sync hunterhogan ===
189
+
190
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
191
+ [tool.ruff.lint.flake8-import-conventions]
192
+ banned-aliases = { altair = ["alt"], datetime = ["dt"], holoviews = ["hv"], matplotlib = ["mpl"], "matplotlib.pyplot" = ["plt"], networkx = ["nx"], numpy = ["np"], "numpy.typing" = ["npt"], optype = ["op"], pandas = ["pd"], panel = ["pn"], "plotly.express" = ["px"], polars = ["pl"], pyarrow = ["pa"], regex = ["re"], seaborn = ["sns"], tensorflow = ["tf"], tkinter = ["tk"], "xml.etree.ElementTree" = ["ET"] }
193
+ # === OK_EDIT: path-sync hunterhogan ===
194
+
195
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
196
+ [tool.ruff.lint.flake8-import-conventions.aliases]
197
+ "accelerate.utils.dataclasses" = "accelerate_dataclasses"
198
+ "fs.path" = "fs_path"
199
+ "gmpy2.bit_test" = "isBit1吗"
200
+ "gmpy2.is_even" = "isEven吗"
201
+ "gmpy2.is_odd" = "isOdd吗"
202
+ "humpy_cytoolz.assoc" = "associateKeyValue"
203
+ "humpy_cytoolz.curry" = "syntacticCurry"
204
+ "humpy_cytoolz.groupby" = "toolz_groupby"
205
+ "itertools.product" = "CartesianProduct"
206
+ "math.comb" = "nCr"
207
+ "more_itertools.all_unique" = "allUnique吗"
208
+ "regex" = "regex"
209
+ "scipy" = "scipy"
210
+ "sympy.binomial" = "sympy_binomial"
211
+ "sympy.catalan" = "sympy_catalan"
212
+ "sympy.functions.combinatorial.factorials.binomial" = "sympy_binomial"
213
+ "sympy.functions.combinatorial.numbers.catalan" = "sympy_catalan"
214
+ "sympy" = "sympy"
215
+ "torch.autograd.grad" = "torch_grad"
216
+ "torch.nn.functional" = "F"
217
+ "torch.nn.parallel.DistributedDataParallel" = "DDP"
218
+ numpy = "numpy"
219
+ pandas = "pandas"
220
+ polars = "polars"
221
+ re = "regex"
222
+ # === OK_EDIT: path-sync hunterhogan ===
223
+
224
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
225
+ [tool.ruff.lint.flake8-quotes]
226
+ inline-quotes = "single"
227
+ # === OK_EDIT: path-sync hunterhogan ===
228
+
229
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
230
+ [tool.ruff.lint.per-file-ignores]
231
+ "**/*_test.py" = ["ARG", "assert", "BLE", "D", "DTZ", "FBT", "PT", "suspicious-non-cryptographic-random-usage", "TRY"]
232
+ "**/conftest*.py" = ["ARG", "assert", "BLE", "D", "DTZ", "FBT", "PT", "suspicious-non-cryptographic-random-usage", "TRY"]
233
+ "**/test_*.py" = ["ARG", "assert", "BLE", "D", "DTZ", "FBT", "PT", "suspicious-non-cryptographic-random-usage", "TRY"]
234
+ "**/tests/**" = ["ARG", "assert", "BLE", "D", "DTZ", "FBT", "PT", "suspicious-non-cryptographic-random-usage", "TRY"]
235
+ # === OK_EDIT: path-sync hunterhogan ===
236
+
237
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
238
+ [tool.ruff.lint.pydocstyle]
239
+ convention = "numpy"
240
+ # === OK_EDIT: path-sync hunterhogan ===
241
+
242
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
243
+ [tool.ruff.format]
244
+ docstring-code-format = true
245
+ indent-style = "tab"
246
+ line-ending = "lf"
247
+ nested-string-quote-style = "preferred"
248
+ quote-style = "single"
249
+ skip-magic-trailing-comma = true
250
+ # === OK_EDIT: path-sync hunterhogan ===
251
+
252
+ [tool.setuptools]
253
+ package-data = { "*" = ["py.typed"] }
254
+ packages = ["hunterMakesPy", "hunterMakesPy.tests", "hunterMakesPy.tests.dataSamples"]
255
+
256
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
257
+ [tool.tombi.format.rules]
258
+ line-ending = "lf"
259
+ # === OK_EDIT: path-sync hunterhogan ===
260
+
261
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
262
+ [tool.ty.analysis]
263
+ respect-type-ignore-comments = false
264
+ return-type-inference = "always"
265
+ # === OK_EDIT: path-sync hunterhogan ===
266
+
267
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
268
+ [tool.ty.environment]
269
+ extra-paths = ["./typings"]
270
+ python-platform = "all"
271
+ # === OK_EDIT: path-sync hunterhogan ===
272
+
273
+ # === DO_NOT_EDIT: path-sync hunterhogan ===
274
+ [tool.ty.rules]
275
+ blanket-ignore-comment = "error"
276
+ missing-override-decorator = "error"
277
+ missing-type-argument = "error"
278
+ possibly-missing-attribute = "warn" # Might annoy you: ty's docs say this rule produces many false positives.
279
+ possibly-unresolved-reference = "warn" # Might annoy you: ty's docs say this rule produces many false positives.
280
+ truthiness-test-of-none-union = "warn" # Might annoy you: flags `if value:` on `int | None` or `str | None` even when treating 0 or '' like None is deliberate.
281
+ # === OK_EDIT: path-sync hunterhogan ===
282
+
283
+ [tool.updateCitation]
284
+ filenameCitationDOTcff = "CITATION.cff"
285
+ pathFilenameCitationSSOT = "citations/CITATION.cff"
@@ -1,81 +0,0 @@
1
- [project]
2
- name = "hunterMakesPy"
3
- version = "0.10.1"
4
- description = "Easy Python functions making making functional Python functions easier."
5
- readme = "README.md"
6
- requires-python = ">=3.12"
7
- license = "CC-BY-NC-4.0"
8
- authors = [{ name = "Hunter Hogan", email = "HunterHogan@pm.me" }]
9
- keywords = [
10
- "input validation",
11
- "module loading",
12
- "package settings",
13
- "parameter validation",
14
- ]
15
- classifiers = [
16
- "Development Status :: 5 - Production/Stable",
17
- "Environment :: Console",
18
- "Framework :: Pytest",
19
- "Intended Audience :: Developers",
20
- "Natural Language :: English",
21
- "Operating System :: OS Independent",
22
- "Programming Language :: Python",
23
- "Programming Language :: Python :: 3.12",
24
- "Programming Language :: Python :: 3.15",
25
- "Topic :: Software Development :: Libraries :: Python Modules",
26
- "Topic :: Utilities",
27
- "Typing :: Typed",
28
- ]
29
- dependencies = [
30
- "Z0Z_tools>=4.1.1",
31
- "autoflake",
32
- "charset_normalizer",
33
- "isort",
34
- "more_itertools",
35
- "numpy>=2.0",
36
- "typing_extensions>=4.10.0"
37
- ]
38
- optional-dependencies = { development = ["pytest-cov"], testing = [
39
- "hypothesis",
40
- "pytest>=9.0",
41
- "pytest-xdist"
42
- ] }
43
-
44
- [project.urls]
45
- Documentation = "https://context7.com/hunterhogan/huntermakespy"
46
- Donate = "https://www.patreon.com/integrated"
47
- Homepage = "https://github.com/hunterhogan/hunterMakesPy"
48
- Issues = "https://github.com/hunterhogan/hunterMakesPy/issues"
49
- Repository = "https://github.com/hunterhogan/hunterMakesPy"
50
-
51
- [build-system]
52
- requires = ["setuptools"]
53
- build-backend = "setuptools.build_meta"
54
-
55
- [tool.coverage]
56
- report = { exclude_also = [
57
- "@overload",
58
- "^\\s*\\.\\.\\.$",
59
- "if __name__ == \"__main__\":",
60
- "if TYPE_CHECKING:",
61
- ], ignore_errors = false }
62
- run = { branch = true, data_file = "hunterMakesPy/tests/coverage/.coverage", omit = [
63
- "hunterMakesPy/tests/*"
64
- ], source = ["."] }
65
-
66
- [tool.pytest]
67
- addopts = ["--color=yes"]
68
- empty_parameter_set_mark = "fail_at_collect"
69
- filterwarnings = ["error"]
70
- log_auto_indent = "On"
71
- minversion = "9.0"
72
- strict = true
73
- testpaths = ["hunterMakesPy/tests"]
74
-
75
- [tool.setuptools]
76
- package-data = { "*" = ["py.typed"] }
77
- packages = ["hunterMakesPy", "hunterMakesPy.tests", "hunterMakesPy.tests.dataSamples"]
78
-
79
- [tool.updateCitation]
80
- filenameCitationDOTcff = "CITATION.cff"
81
- pathFilenameCitationSSOT = "citations/CITATION.cff"
File without changes
File without changes