hunterMakesPy 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl

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/__init__.py CHANGED
@@ -8,26 +8,15 @@ This package provides:
8
8
 
9
9
  """
10
10
 
11
- # isort: split
12
11
  from hunterMakesPy.theTypes import identifierDotAttribute as identifierDotAttribute, Ordinals as Ordinals
13
12
 
14
- # isort: split
15
13
  from hunterMakesPy.coping import PackageSettings as PackageSettings, raiseIfNone as raiseIfNone
16
14
 
17
- # isort: split
18
- from hunterMakesPy.parseParameters import (
19
- defineConcurrencyLimit as defineConcurrencyLimit, intInnit as intInnit, oopsieKwargsie as oopsieKwargsie)
15
+ from hunterMakesPy.parseParameters import defineConcurrencyLimit, intInnit, oopsieKwargsie
20
16
 
21
- # isort: split
22
17
  from hunterMakesPy.filesystemToolkit import (
23
- importLogicalPath2Identifier as importLogicalPath2Identifier,
24
- importPathFilename2Identifier as importPathFilename2Identifier, makeDirsSafely as makeDirsSafely,
25
- writePython as writePython, writeStringToHere as writeStringToHere)
18
+ importLogicalPath2Identifier, importPathFilename2Identifier, makeDirsSafely, writePython, writeStringToHere)
26
19
 
27
- # isort: split
28
- from hunterMakesPy.dataStructures import (
29
- autoDecodingRLE as autoDecodingRLE, stringItUp as stringItUp,
30
- updateExtendPolishDictionaryLists as updateExtendPolishDictionaryLists)
20
+ from hunterMakesPy.dataStructures import autoDecodingRLE, stringItUp, updateExtendPolishDictionaryLists
31
21
 
32
- # isort: split
33
22
  from hunterMakesPy._theSSOT import settingsPackage # pyright: ignore[reportUnusedImport]
@@ -267,7 +267,7 @@ def updateExtendPolishDictionaryLists(*dictionaryLists: Mapping[str, list[小于
267
267
  for keyName, keyValue in dictionaryListTarget.items():
268
268
  try:
269
269
  ImaStr = str(keyName)
270
- ImaList = list(keyValue)
270
+ ImaList: list[小于] = list(keyValue)
271
271
  ePluribusUnum.setdefault(ImaStr, []).extend(ImaList)
272
272
  except TypeError:
273
273
  if killErroneousDataTypes:
@@ -118,7 +118,6 @@ settings_isortDEFAULT: dict[str, bool | int | str | list[str]] = {
118
118
  "lines_between_types": 0,
119
119
  "multi_line_output": 4,
120
120
  "no_sections": True,
121
- "skip": ["__init__.py"], # TODO think
122
121
  "use_parentheses": True,
123
122
  }
124
123
 
@@ -148,21 +148,18 @@ def defineConcurrencyLimit(*, limit: bool | float | int | None, cpuTotal: int =
148
148
  limit = limitFromString
149
149
  if isinstance(limit, float) and abs(limit) >= 1:
150
150
  limit = round(limit)
151
- match limit:
152
- case None | False | 0:
153
- pass
154
- case True:
155
- concurrencyLimit = 1
156
- case _ if limit >= 1:
157
- concurrencyLimit = int(limit)
158
- case _ if 0 < limit < 1:
159
- concurrencyLimit = round(limit * cpuTotal)
160
- case _ if -1 < limit < 0:
161
- concurrencyLimit = cpuTotal - abs(round(limit * cpuTotal))
162
- case _ if limit <= -1:
163
- concurrencyLimit = cpuTotal - abs(int(limit))
164
- case _:
165
- pass
151
+ if limit is None or limit is False or limit == 0:
152
+ pass
153
+ elif limit is True:
154
+ concurrencyLimit = 1
155
+ elif limit >= 1:
156
+ concurrencyLimit = int(limit)
157
+ elif 0 < limit < 1:
158
+ concurrencyLimit = round(limit * cpuTotal)
159
+ elif -1 < limit < 0:
160
+ concurrencyLimit = cpuTotal - abs(round(limit * cpuTotal))
161
+ elif limit <= -1:
162
+ concurrencyLimit = cpuTotal - abs(int(limit))
166
163
 
167
164
  return max(int(concurrencyLimit), 1)
168
165
 
@@ -208,7 +205,7 @@ def intInnit(listInt_Allegedly: Iterable[Any], parameterName: str | None = None,
208
205
  parameterType = parameterType or list
209
206
 
210
207
  if not listInt_Allegedly:
211
- message = f"I did not receive a value for {parameterName}, but it is required."
208
+ message: str = f"I did not receive a value for {parameterName}, but it is required."
212
209
  raise ValueError(message)
213
210
 
214
211
  # Be nice, and assume the input container is valid and every element is valid.
@@ -319,11 +316,3 @@ def oopsieKwargsie(huh: Any) -> bool | None | str:
319
316
  if formatted == str(None):
320
317
  return None
321
318
  return huh
322
-
323
- if __name__ == '__main__':
324
- # Frankly, I cannot remember the precise reason I put this in some modules. It solved a concurrency problem I was having at the time,
325
- # but it felt like a hack at the time and it feels even more like a hack now. I suspect I will eventually learn enough so that I can
326
- # come full circle: know why I added it, know how I already fixed the real issue, and know that I can safely remove this. # noqa: ERA001
327
- multiprocessing.set_start_method('spawn')
328
-
329
- # Well, actually, I don't want to be programming for so long that I learn that much. I want to heal and do things in my areas of competency.
hunterMakesPy/theTypes.py CHANGED
@@ -8,10 +8,14 @@ identifierDotAttribute: TypeAlias = str
8
8
 
9
9
  """
10
10
 
11
-
12
11
  class Ordinals(Protocol):
13
- """Any Python `object` `type` that may be ordered before or after a comparable `object` `type` using a less-than-or-equal-to comparison."""
12
+ """Any Python `object` `type` that may be ordered before or after a comparable `object` `type` by comparison operators."""
14
13
 
15
14
  def __le__(self, not_self_selfButSelfSelf_youKnow: Self, /) -> bool:
16
15
  """Comparison by "***l***ess than or ***e***qual to"."""
17
16
  ...
17
+
18
+ def __lt__(self, not_self_selfButSelfSelf_youKnow: Self, /) -> bool:
19
+ """Comparison by "***l***ess ***t***han"."""
20
+ ...
21
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hunterMakesPy
3
- Version: 0.3.2
3
+ Version: 0.3.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: CC-BY-NC-4.0
@@ -1,20 +1,20 @@
1
- hunterMakesPy/__init__.py,sha256=oKeYKtnf8Y0oLe7UVlOFFx0BXi4GLEgdwEuJ3MOKc-4,1514
1
+ hunterMakesPy/__init__.py,sha256=bydhevjZG6_JT2q_v9rfozvjhXVqyyUGCovL6EwxlBk,1168
2
2
  hunterMakesPy/_theSSOT.py,sha256=x9Rdmw0qeAqgmlMFyFYRTRV5kEDYXcN4aBZ4KjlnKEU,170
3
3
  hunterMakesPy/coping.py,sha256=42a_1kB6zHeRpfbpPnjmhrgWTPvUtqE5W9z3tqu-K8w,6068
4
- hunterMakesPy/dataStructures.py,sha256=GMl9AiQPuype67NZD7moLVzxezPVP38Cw3CoN4gRJI4,11920
5
- hunterMakesPy/filesystemToolkit.py,sha256=8Yx8SH56w7g9wxpLjsdCaC1RvsW8Ur_cDrxhHaY9cLM,6848
6
- hunterMakesPy/parseParameters.py,sha256=uQXoD89BfWAmRVT2yabyHtW7qITwAuCC9eh0sQFIV5Q,11966
4
+ hunterMakesPy/dataStructures.py,sha256=GbFk5uJskkjL5WNCSJbgn7BKQVh0f792gZ4zgSod9H8,11934
5
+ hunterMakesPy/filesystemToolkit.py,sha256=4zgXrDELBnS2UJ4sGPJVFyyrjDwfF0evnGIWssm--Jk,6809
6
+ hunterMakesPy/parseParameters.py,sha256=k5sGBoCeVRK02lNze59xPb99UiXm2l-HXI5HQPcKHnY,11321
7
7
  hunterMakesPy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  hunterMakesPy/pytestForYourUse.py,sha256=GiN1C1gTTM0ZunRPEMnrKlLQLMdH0wF_ZGr_RPgRjjA,500
9
- hunterMakesPy/theTypes.py,sha256=gqTGyqrLySOKKXG0NNgixqwePPZ2_hBlzKNYS3jpHtk,627
9
+ hunterMakesPy/theTypes.py,sha256=Ce2hGCsBgd_DaUVoWZ6Iq-Lp4qf6053orHq0o52ssgM,734
10
10
  hunterMakesPy/tests/__init__.py,sha256=C_FzfKDi_VrGVxlenWHyOYtKShAKlt3KW14jeRx1mQI,224
11
11
  hunterMakesPy/tests/conftest.py,sha256=NZQPRiwvGhP16hJ6WGGm9eKLxfQArYV8E9X12YzSpP0,2827
12
12
  hunterMakesPy/tests/test_coping.py,sha256=mH89TUAL6fJanBLlhdVlCNNQqm5OpdcQMP_p5W2JJwo,9860
13
13
  hunterMakesPy/tests/test_dataStructures.py,sha256=WQlq98SllAPSUEjvIHZ9Az2pKNWeLNP4dnl3UyP9yuc,16004
14
14
  hunterMakesPy/tests/test_filesystemToolkit.py,sha256=_CoSMzstJwWZ_tkNyIqclOIIqTaY2tYfUIgxGFfC0Jk,15335
15
15
  hunterMakesPy/tests/test_parseParameters.py,sha256=UKf1hwhLtXYL96VVJNf8NpJOyzRLO204pd-9PdDjufA,13267
16
- huntermakespy-0.3.2.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
17
- huntermakespy-0.3.2.dist-info/METADATA,sha256=cSkWkEXB8eEXH5StDtTZKsc2x5uTN1IlAC1xJapoHU4,6319
18
- huntermakespy-0.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- huntermakespy-0.3.2.dist-info/top_level.txt,sha256=Uh4bj8EDTdsRpqY1VlK_his_B4HDfZ6Tqrwhoj75P_w,14
20
- huntermakespy-0.3.2.dist-info/RECORD,,
16
+ huntermakespy-0.3.3.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
17
+ huntermakespy-0.3.3.dist-info/METADATA,sha256=VNrznpDWhCCoxUM0nAufsjImFAiVagnHgFbCPPXxnzQ,6319
18
+ huntermakespy-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ huntermakespy-0.3.3.dist-info/top_level.txt,sha256=Uh4bj8EDTdsRpqY1VlK_his_B4HDfZ6Tqrwhoj75P_w,14
20
+ huntermakespy-0.3.3.dist-info/RECORD,,