pythonic-fp-booleans 4.1.1__tar.gz → 4.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- Metadata-Version: 2.5
1
+ Metadata-Version: 2.4
2
2
  Name: pythonic-fp-booleans
3
- Version: 4.1.1
3
+ Version: 4.3.0
4
4
  Summary: True Booleans which are subtypable.
5
5
  Keywords: booleans,subtypable
6
6
  Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
7
- Requires-Python: >=3.13
7
+ Requires-Python: >=3.14
8
8
  Description-Content-Type: text/markdown
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Framework :: Pytest
@@ -12,15 +12,14 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
15
16
  Classifier: Typing :: Typed
16
17
  License-File: LICENSE
17
- Requires-Dist: pythonic-fp-gadgets>=4.0.2
18
+ Requires-Dist: pythonic-fp-gadgets>=4.5.0
18
19
  Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-booleans/blob/main/CHANGELOG.md
19
20
  Project-URL: Documentation, https://grscheller.github.io/pythonic-fp-booleans/release/html/
20
21
  Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
21
22
  Project-URL: Source, https://github.com/grscheller/pythonic-fp-booleans
22
- Import-Name: pythonic_fp.booleans
23
- Import-Namespace: pythonic_fp
24
23
 
25
24
  # Pythonic FP - Booleans
26
25
 
@@ -4,9 +4,10 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "pythonic-fp-booleans"
7
- version = "4.1.1"
7
+ version = "4.3.0"
8
+ description = "True Booleans which are subtypable."
8
9
  readme = "README.md"
9
- requires-python = ">=3.13"
10
+ requires-python = ">=3.14" # floor: PEP 649/749 deferred annotations — class-level self-reference (SBool in its own ClassVar annotation) NameErrors on <3.14
10
11
  authors = [
11
12
  { name = "Geoffrey R. Scheller", email = "geoffrey@scheller.com" },
12
13
  ]
@@ -21,12 +22,12 @@ classifiers = [
21
22
  "License :: OSI Approved :: Apache Software License",
22
23
  "Operating System :: OS Independent",
23
24
  "Programming Language :: Python :: 3.14",
25
+ "Programming Language :: Python :: 3.15",
24
26
  "Typing :: Typed",
25
27
  ]
26
28
  dependencies = [
27
- "pythonic-fp-gadgets>=4.0.2",
29
+ "pythonic-fp-gadgets>=4.5.0",
28
30
  ]
29
- description = "True Booleans which are subtypable."
30
31
 
31
32
  [project.urls]
32
33
  Changelog = "https://github.com/grscheller/pythonic-fp-booleans/blob/main/CHANGELOG.md"
@@ -39,9 +40,6 @@ docs = [
39
40
  "furo>=2025.12.19",
40
41
  "sphinx>=9.1",
41
42
  ]
42
- pub = [
43
- "flit",
44
- ]
45
43
  test = [
46
44
  "pytest>=8.4.1",
47
45
  ]
@@ -55,6 +53,11 @@ exclude = [
55
53
  "tests/",
56
54
  ]
57
55
 
56
+ [tool.pytest]
57
+ addopts = ["-ra"]
58
+ consider_namespace_packages = true
59
+ testpaths = ["tests/"]
60
+
58
61
  [tool.mypy]
59
62
  explicit_package_bases = true
60
63
  local_partial_types = true
@@ -63,11 +66,6 @@ warn_redundant_casts = true
63
66
  warn_return_any = true
64
67
  warn_unused_configs = true
65
68
 
66
- [tool.pytest]
67
- addopts = ["-ra"]
68
- consider_namespace_packages = true
69
- testpaths = ["tests/"]
70
-
71
69
  [tool.ruff]
72
70
  target-version = "py314"
73
71
 
@@ -133,14 +133,7 @@ class SBool(int):
133
133
  return type(self)(True, self._flavor)
134
134
 
135
135
  def __and__(self, other: int) -> int:
136
- try:
137
- base_class = fca(type(self), type(other))
138
- except TypeError:
139
- if type(other) is bool:
140
- base_class = int
141
- else:
142
- msg = f"unsupported operand type(s) for &: '{type(self)}' and '{type(other)}'"
143
- raise TypeError(msg)
136
+ base_class = fca(type(self), type(other))
144
137
 
145
138
  if issubclass(base_class, SBool):
146
139
  if self._flavor == cast(SBool, other)._flavor:
@@ -155,15 +148,7 @@ class SBool(int):
155
148
  return int(self) & int(other)
156
149
 
157
150
  def __or__(self, other: int) -> int:
158
- try:
159
- base_class = fca(type(self), type(other))
160
- except TypeError:
161
- if type(other) is bool:
162
- base_class = int
163
- else:
164
- msg = f"unsupported operand type(s) for |: '{type(self)}' and '{type(other)}'"
165
- raise TypeError(msg)
166
-
151
+ base_class = fca(type(self), type(other))
167
152
  if issubclass(base_class, SBool):
168
153
  if self._flavor == cast(SBool, other)._flavor:
169
154
  flavor = self._flavor
@@ -177,14 +162,7 @@ class SBool(int):
177
162
  return int(self) | int(other)
178
163
 
179
164
  def __xor__(self, other: int) -> int:
180
- try:
181
- base_class = fca(type(self), type(other))
182
- except TypeError:
183
- if type(other) is bool:
184
- base_class = int
185
- else:
186
- msg = f"unsupported operand type(s) for ^: '{type(self)}' and '{type(other)}'"
187
- raise TypeError(msg)
165
+ base_class = fca(type(self), type(other))
188
166
 
189
167
  if issubclass(base_class, SBool):
190
168
  if self._flavor == cast(SBool, other)._flavor: