pythonic-fp-booleans 3.0.1__tar.gz → 4.0.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.
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/.github/workflows/static.yml +13 -8
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/.gitignore +1 -3
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/CHANGELOG.rst +36 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/PKG-INFO +8 -8
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/README.rst +3 -3
- pythonic_fp_booleans-4.0.0/docs/Makefile +78 -0
- pythonic_fp_booleans-4.0.0/docs/gen_conf.py +110 -0
- pythonic_fp_booleans-4.0.0/docs/source/_static/custom.css +3 -0
- {pythonic_fp_booleans-3.0.1/docs/source/docs → pythonic_fp_booleans-4.0.0/docs/source/api}/flavored.rst +2 -2
- pythonic_fp_booleans-4.0.0/docs/source/api/index.rst +20 -0
- pythonic_fp_booleans-4.0.0/docs/source/api/subtypable.rst +6 -0
- {pythonic_fp_booleans-3.0.1/docs/source/docs → pythonic_fp_booleans-4.0.0/docs/source/api}/truthy_falsy.rst +2 -2
- pythonic_fp_booleans-4.0.0/docs/source/description.rst +25 -0
- pythonic_fp_booleans-3.0.1/docs/index_release.rst → pythonic_fp_booleans-4.0.0/docs/source/index.rst +3 -3
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/docs/source/releases.rst +5 -1
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/pyproject.toml +16 -13
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/src/pythonic_fp/booleans/__init__.py +7 -20
- pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/flavored.py +193 -0
- pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/flavored.pyi +16 -0
- pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/py.typed +0 -0
- pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/subtypable.py +253 -0
- pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/subtypable.pyi +22 -0
- pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/truthy_falsy.py +219 -0
- pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/truthy_falsy.pyi +25 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_flavored.py +16 -26
- pythonic_fp_booleans-4.0.0/tests/test_flavored_non_shortcut_logic.py +136 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_flavored_sbool.py +7 -2
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_true_false.py +5 -5
- pythonic_fp_booleans-4.0.0/tests/test_true_false_non_shortcut_logic.py +121 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_typing.py +90 -21
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_variance.py +65 -36
- pythonic_fp_booleans-3.0.1/docs/Makefile +0 -69
- pythonic_fp_booleans-3.0.1/docs/build/index.html +0 -44
- pythonic_fp_booleans-3.0.1/docs/build/style.css +0 -44
- pythonic_fp_booleans-3.0.1/docs/conf_custom.py +0 -68
- pythonic_fp_booleans-3.0.1/docs/conf_devel.py +0 -68
- pythonic_fp_booleans-3.0.1/docs/conf_release.py +0 -68
- pythonic_fp_booleans-3.0.1/docs/index_custom.rst +0 -30
- pythonic_fp_booleans-3.0.1/docs/index_devel.rst +0 -30
- pythonic_fp_booleans-3.0.1/docs/source/description.rst +0 -7
- pythonic_fp_booleans-3.0.1/docs/source/docs/index.rst +0 -15
- pythonic_fp_booleans-3.0.1/docs/source/docs/subtypable.rst +0 -8
- pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/flavored.py +0 -140
- pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/flavored.pyi +0 -19
- pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/subtypable.py +0 -166
- pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/subtypable.pyi +0 -18
- pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/truthy_falsy.py +0 -168
- pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/truthy_falsy.pyi +0 -21
- pythonic_fp_booleans-3.0.1/tests/test_flavored_non_shortcut_logic.py +0 -112
- pythonic_fp_booleans-3.0.1/tests/test_true_false_non_shortcut_logic.py +0 -157
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/LICENSE +0 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/docs/requirements.txt +0 -0
- /pythonic_fp_booleans-3.0.1/docs/build/.nojekyll → /pythonic_fp_booleans-4.0.0/docs/source/_static/.gitkeep +0 -0
- /pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/__init__.pyi → /pythonic_fp_booleans-4.0.0/docs/source/_templates/.gitkeep +0 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/docs/source/changelog.rst +0 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/docs/source/usage.rst +0 -0
- /pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/py.typed → /pythonic_fp_booleans-4.0.0/src/pythonic_fp/booleans/__init__.pyi +0 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_bool_vs_fbool.py +0 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_bool_vs_sbool.py +0 -0
- {pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/tests/test_subtypable_non_shortcut_logic.py +0 -0
|
@@ -5,6 +5,11 @@ on:
|
|
|
5
5
|
branches: ["main"]
|
|
6
6
|
workflow_dispatch:
|
|
7
7
|
|
|
8
|
+
env:
|
|
9
|
+
RELEASE: '4.0.0'
|
|
10
|
+
DEVEL: '4.0.1'
|
|
11
|
+
PYTHON: '3.14'
|
|
12
|
+
|
|
8
13
|
permissions:
|
|
9
14
|
contents: read
|
|
10
15
|
pages: write
|
|
@@ -27,23 +32,23 @@ jobs:
|
|
|
27
32
|
- name: Select Python
|
|
28
33
|
uses: actions/setup-python@v6
|
|
29
34
|
with:
|
|
30
|
-
python-version:
|
|
35
|
+
python-version: ${{ env.PYTHON }}
|
|
31
36
|
|
|
32
37
|
- name: Install Sphinx Dependencies
|
|
33
|
-
run:
|
|
38
|
+
run: |
|
|
39
|
+
pip install -r docs/requirements.txt
|
|
40
|
+
sudo apt-get install -y graphviz
|
|
34
41
|
|
|
35
|
-
- name: Build
|
|
42
|
+
- name: Build Release Docs
|
|
36
43
|
run: |
|
|
37
44
|
pip install pythonic-fp-booleans
|
|
38
|
-
|
|
39
|
-
cp docs/conf_release.py docs/source/conf.py
|
|
45
|
+
docs/gen_conf.py release ${{ env.RELEASE }} Booleans booleans > docs/source/conf.py
|
|
40
46
|
sphinx-build -M html docs/source docs/build/release
|
|
41
47
|
|
|
42
|
-
- name: Build
|
|
48
|
+
- name: Build Development Docs
|
|
43
49
|
run: |
|
|
44
50
|
pip install -e .
|
|
45
|
-
|
|
46
|
-
cp docs/conf_devel.py docs/source/conf.py
|
|
51
|
+
docs/gen_conf.py devel ${{ env.DEVEL }} Booleans booleans > docs/source/conf.py
|
|
47
52
|
sphinx-build -M html docs/source docs/build/development
|
|
48
53
|
|
|
49
54
|
- name: Setup Pages
|
|
@@ -17,6 +17,42 @@ See `Semantic Versioning 2.0.0 <https://semver.org>`_.
|
|
|
17
17
|
Releases and Important Milestones
|
|
18
18
|
---------------------------------
|
|
19
19
|
|
|
20
|
+
PyPI 4.0.0 - 2026-05-18
|
|
21
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
22
|
+
|
|
23
|
+
Revamped pythonic-fp-booleans implementation.
|
|
24
|
+
|
|
25
|
+
- API changes due to flavored booleans being made runtime "invariant"
|
|
26
|
+
|
|
27
|
+
- removed dunders methods __rand__, __ror__, __rxor__ from all classes
|
|
28
|
+
- flavored booleans bitwise operators now throw ValueError for different flavors
|
|
29
|
+
|
|
30
|
+
- pushing Python's type system a bit
|
|
31
|
+
|
|
32
|
+
- invariant, contravariant, covariant apply to operator arguments
|
|
33
|
+
- not to the class itself
|
|
34
|
+
|
|
35
|
+
- it should, but it does not
|
|
36
|
+
- the class is a "namespace" not the first argument to an operator
|
|
37
|
+
|
|
38
|
+
- if I were to do this over again I'd
|
|
39
|
+
|
|
40
|
+
- define class functions (contravariant args, covariant return values) which dunders would call
|
|
41
|
+
- make SBool a "true Boolean" not a subtype of "int"
|
|
42
|
+
|
|
43
|
+
Development Status Reappraisal - 2026-05-05
|
|
44
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
45
|
+
|
|
46
|
+
Maintainer appraises the Development Status for
|
|
47
|
+
pythonic-fp-booleans to be ``"4 - Beta"``.
|
|
48
|
+
|
|
49
|
+
PyPI 3.0.2 - 2026-04-25
|
|
50
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
51
|
+
|
|
52
|
+
Corrected locations of project links. Changes will not
|
|
53
|
+
fully be in effect until the next release of each
|
|
54
|
+
Pythonic FP project to PyPI.
|
|
55
|
+
|
|
20
56
|
PyPI 3.0.1 - 2025-12-02
|
|
21
57
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
22
58
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonic-fp-booleans
|
|
3
|
-
Version:
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: Booleans
|
|
5
5
|
Keywords: booleans,subtypable
|
|
6
6
|
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
7
|
Requires-Python: >=3.13
|
|
@@ -11,14 +11,14 @@ Classifier: Framework :: Pytest
|
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
15
|
Classifier: Typing :: Typed
|
|
16
16
|
License-File: LICENSE
|
|
17
17
|
Requires-Dist: pythonic-fp-gadgets>=4.0.2
|
|
18
18
|
Requires-Dist: pytest>=8.4.1 ; extra == "test"
|
|
19
19
|
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-booleans/blob/main/CHANGELOG.rst
|
|
20
|
-
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/booleans
|
|
21
|
-
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
|
|
20
|
+
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp/projects/booleans.html
|
|
21
|
+
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
|
|
22
22
|
Project-URL: Source, https://github.com/grscheller/pythonic-fp-booleans
|
|
23
23
|
Provides-Extra: test
|
|
24
24
|
|
|
@@ -36,15 +36,15 @@ can be non-shortcut logically composed with Python’s bitwise operators.
|
|
|
36
36
|
|
|
37
37
|
Part of the
|
|
38
38
|
`pythonic-fp
|
|
39
|
-
<https://grscheller.github.io/pythonic-fp
|
|
39
|
+
<https://grscheller.github.io/pythonic-fp/>`_
|
|
40
40
|
PyPI projects.
|
|
41
41
|
|
|
42
42
|
Documentation
|
|
43
43
|
-------------
|
|
44
44
|
|
|
45
|
-
Documentation for this project
|
|
45
|
+
Documentation and other links for this project are hosted on
|
|
46
46
|
`GitHub Pages
|
|
47
|
-
<https://grscheller.github.io/pythonic-fp
|
|
47
|
+
<https://grscheller.github.io/pythonic-fp/projects/booleans.html>`_.
|
|
48
48
|
|
|
49
49
|
Copyright and License
|
|
50
50
|
---------------------
|
|
@@ -12,15 +12,15 @@ can be non-shortcut logically composed with Python’s bitwise operators.
|
|
|
12
12
|
|
|
13
13
|
Part of the
|
|
14
14
|
`pythonic-fp
|
|
15
|
-
<https://grscheller.github.io/pythonic-fp
|
|
15
|
+
<https://grscheller.github.io/pythonic-fp/>`_
|
|
16
16
|
PyPI projects.
|
|
17
17
|
|
|
18
18
|
Documentation
|
|
19
19
|
-------------
|
|
20
20
|
|
|
21
|
-
Documentation for this project
|
|
21
|
+
Documentation and other links for this project are hosted on
|
|
22
22
|
`GitHub Pages
|
|
23
|
-
<https://grscheller.github.io/pythonic-fp
|
|
23
|
+
<https://grscheller.github.io/pythonic-fp/projects/booleans.html>`_.
|
|
24
24
|
|
|
25
25
|
Copyright and License
|
|
26
26
|
---------------------
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Makefile for Sphinx documentation
|
|
2
|
+
|
|
3
|
+
# Last and future releases
|
|
4
|
+
# - former needs to agree with PyPI
|
|
5
|
+
# - later needs to agree with pyproject.toml
|
|
6
|
+
PROJECT_NAME = Booleans
|
|
7
|
+
PYPI_NAME = booleans
|
|
8
|
+
RELEASE_VERSION = 4.0.0
|
|
9
|
+
DEVEL_VERSION = 4.0.1
|
|
10
|
+
CUSTOM_VERSION = 0.0.0
|
|
11
|
+
|
|
12
|
+
SPHINXOPTS ?=
|
|
13
|
+
SPHINXBUILD ?= sphinx-build
|
|
14
|
+
SOURCEDIR = source
|
|
15
|
+
BUILDDIR = build
|
|
16
|
+
|
|
17
|
+
STATICDIR = source/_static
|
|
18
|
+
TEMPLATEDIR = source/_templates
|
|
19
|
+
|
|
20
|
+
# Put help first so that "make" without argument is like "make help".
|
|
21
|
+
help:
|
|
22
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
|
|
23
|
+
|
|
24
|
+
clean_source:
|
|
25
|
+
@rm -f "$(SOURCEDIR)"/conf.py
|
|
26
|
+
|
|
27
|
+
clean_devel:
|
|
28
|
+
@rm -rf "$(BUILDDIR)"/development
|
|
29
|
+
|
|
30
|
+
clean_release:
|
|
31
|
+
@rm -rf "$(BUILDDIR)"/release
|
|
32
|
+
|
|
33
|
+
clean_custom:
|
|
34
|
+
@rm -rf "$(BUILDDIR)"/custom
|
|
35
|
+
|
|
36
|
+
clean: clean_devel clean_release clean_custom clean_source
|
|
37
|
+
@rm -rf $(BUILDDIR)
|
|
38
|
+
@echo Removed all doc build artifacts.
|
|
39
|
+
|
|
40
|
+
setup_devel: clean_devel
|
|
41
|
+
@./gen_conf.py devel "$(DEVEL_VERSION)" "$(PROJECT_NAME)" "$(PYPI_NAME)" > "$(SOURCEDIR)"/conf.py
|
|
42
|
+
|
|
43
|
+
setup_release: clean_release
|
|
44
|
+
@./gen_conf.py release "$(RELEASE_VERSION)" "$(PROJECT_NAME)" "$(PYPI_NAME)" > "$(SOURCEDIR)"/conf.py
|
|
45
|
+
|
|
46
|
+
setup_custom: clean_custom
|
|
47
|
+
@./gen_conf.py custom "$(CUSTOM_VERSION)" "$(PROJECT_NAME)" "$(PYPI_NAME)" > "$(SOURCEDIR)"/conf.py
|
|
48
|
+
|
|
49
|
+
setup_redo: clean_custom
|
|
50
|
+
@echo Redoing custom build with a possibly reeditted conf.py
|
|
51
|
+
@./gen_conf.py redo "" "" ""
|
|
52
|
+
|
|
53
|
+
# Build development labeled html docs.
|
|
54
|
+
devel: Makefile setup_devel
|
|
55
|
+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"/development $(SPHINXOPTS)
|
|
56
|
+
|
|
57
|
+
# Build release labeled html docs.
|
|
58
|
+
release: Makefile setup_release
|
|
59
|
+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"/release $(SPHINXOPTS)
|
|
60
|
+
|
|
61
|
+
# Build custom labeled html docs.
|
|
62
|
+
custom: Makefile setup_custom
|
|
63
|
+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"/custom $(SPHINXOPTS)
|
|
64
|
+
|
|
65
|
+
# Build HTML docs with previous generated (possibly hand edited) source/conf.py,
|
|
66
|
+
# put results in $(BUILDDIR)/custom.
|
|
67
|
+
redo: Makefile setup_redo
|
|
68
|
+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"/custom $(SPHINXOPTS)
|
|
69
|
+
|
|
70
|
+
# Catch-all target: route all unknown targets to Sphinx and save to $(BUILDDIR)/custom.
|
|
71
|
+
# Reuse a previously generated source/conf.py.
|
|
72
|
+
%: Makefile setup_redo
|
|
73
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)"/custom $(SPHINXOPTS)
|
|
74
|
+
|
|
75
|
+
.PHONY: help Makefile
|
|
76
|
+
.PHONY: setup_devel setup_release setup_custom
|
|
77
|
+
.PHONY: devel release
|
|
78
|
+
.PHONY: clean_source clean_devel clean_release clean_custom clean
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# Generate conf.py Sphinx configuration executable
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
import os
|
|
6
|
+
|
|
7
|
+
project_prefix = 'Pythonic FP'
|
|
8
|
+
pypi_prefix = 'pythonic-fp'
|
|
9
|
+
author = 'Geoffrey R. Scheller'
|
|
10
|
+
copyright = f'2023-2026, {author}'
|
|
11
|
+
|
|
12
|
+
args = sys.argv[1:]
|
|
13
|
+
num_args = len(args)
|
|
14
|
+
|
|
15
|
+
if num_args == 4:
|
|
16
|
+
build_type, version, project_name, pypi_name = args
|
|
17
|
+
project = project_prefix + ' - ' + project_name
|
|
18
|
+
pypi_project_repo = pypi_prefix + '-' + pypi_name
|
|
19
|
+
project_url_rst = f'`{project} <https://pypi.org/project/{pypi_project_repo}/>`_'
|
|
20
|
+
homepage_url_rst = f'`{project_prefix} <https://grscheller.github.io/{pypi_prefix}/>`_'
|
|
21
|
+
|
|
22
|
+
else:
|
|
23
|
+
sys.exit('Error: gen_conf.py takes exactly 4 arguments')
|
|
24
|
+
|
|
25
|
+
match build_type:
|
|
26
|
+
case 'custom':
|
|
27
|
+
release = f'{version}'
|
|
28
|
+
release_string = f'**Custom PyPI Non-release version {release}**'
|
|
29
|
+
case 'devel':
|
|
30
|
+
release = f'{version}'
|
|
31
|
+
release_string = f'**Proposed PyPI release version {release}**'
|
|
32
|
+
case 'release':
|
|
33
|
+
release = f'{version}'
|
|
34
|
+
release_string = f'**PyPI release version {release}**'
|
|
35
|
+
case 'redo':
|
|
36
|
+
if not os.path.isfile('source/conf.py'):
|
|
37
|
+
sys.exit('Error: cannot redo without source/conf.py')
|
|
38
|
+
sys.exit()
|
|
39
|
+
case _:
|
|
40
|
+
sys.exit(f'Error: unknown built_type {build_type} given')
|
|
41
|
+
|
|
42
|
+
print(f'''# Generated conf.py Sphinx configuration executable
|
|
43
|
+
|
|
44
|
+
from typing import Any
|
|
45
|
+
from sphinx.application import Sphinx
|
|
46
|
+
|
|
47
|
+
project = '{project}'
|
|
48
|
+
author = '{author}'
|
|
49
|
+
copyright = '{copyright}'
|
|
50
|
+
release = '{release}'
|
|
51
|
+
release_string = '{release_string}'
|
|
52
|
+
|
|
53
|
+
def skip_abc_methods(
|
|
54
|
+
app: Any, what: str, name: str, obj: Any, skip: bool, options: Any
|
|
55
|
+
) -> bool:
|
|
56
|
+
if name in [
|
|
57
|
+
'__init_subclass__',
|
|
58
|
+
'__subclasshook__',
|
|
59
|
+
'__class_getitem__',
|
|
60
|
+
'__weakref__',
|
|
61
|
+
]:
|
|
62
|
+
return True # Skip these members
|
|
63
|
+
return skip
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def setup(app: Sphinx) -> None:
|
|
67
|
+
app.connect('autodoc-skip-member', skip_abc_methods)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
extensions = [
|
|
71
|
+
'sphinx.ext.autodoc',
|
|
72
|
+
'sphinx.ext.graphviz',
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
autodoc_default_options = {{
|
|
76
|
+
'members': True,
|
|
77
|
+
'private-members': True,
|
|
78
|
+
'special-members': True,
|
|
79
|
+
'inherited-members': False,
|
|
80
|
+
'show-inheritance': True,
|
|
81
|
+
}}
|
|
82
|
+
autodoc_member_order = 'bysource'
|
|
83
|
+
autoclass_content = 'class'
|
|
84
|
+
autodoc_class_signature = 'separated'
|
|
85
|
+
autodoc_typehints_format = 'short'
|
|
86
|
+
autodoc_use_type_comments = True
|
|
87
|
+
autodoc_docstring_signature = False
|
|
88
|
+
autodoc_preserve_defaults = True
|
|
89
|
+
autodoc_warningiserror = False
|
|
90
|
+
|
|
91
|
+
templates_path = ['_templates']
|
|
92
|
+
exclude_patterns: list[str] = []
|
|
93
|
+
|
|
94
|
+
html_theme_options = {{
|
|
95
|
+
'light_css_variables': {{
|
|
96
|
+
'color-link--visited': 'var(--color-link)',
|
|
97
|
+
}},
|
|
98
|
+
'dark_css_variables': {{
|
|
99
|
+
'color-link--visited': 'var(--color-link)',
|
|
100
|
+
}},
|
|
101
|
+
}}
|
|
102
|
+
html_theme = 'furo'
|
|
103
|
+
html_static_path = ['_static']
|
|
104
|
+
html_css_files = ['custom.css']
|
|
105
|
+
|
|
106
|
+
rst_epilog = """
|
|
107
|
+
.. |RELEASE_STRING| replace:: {release_string}
|
|
108
|
+
|
|
109
|
+
"""
|
|
110
|
+
''')
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Booleans
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
.. automodule:: pythonic_fp.booleans
|
|
5
|
+
:no-members:
|
|
6
|
+
:ignore-module-all:
|
|
7
|
+
:no-index:
|
|
8
|
+
|
|
9
|
+
.. toctree::
|
|
10
|
+
:caption: Subtypable Boolean
|
|
11
|
+
:maxdepth: 1
|
|
12
|
+
|
|
13
|
+
subtypable
|
|
14
|
+
|
|
15
|
+
.. toctree::
|
|
16
|
+
:caption: Subtyped Boolean examples
|
|
17
|
+
:maxdepth: 1
|
|
18
|
+
|
|
19
|
+
flavored
|
|
20
|
+
truthy_falsy
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Description
|
|
2
|
+
===========
|
|
3
|
+
|
|
4
|
+
.. automodule:: pythonic_fp.booleans
|
|
5
|
+
:no-members:
|
|
6
|
+
:ignore-module-all:
|
|
7
|
+
:no-index:
|
|
8
|
+
|
|
9
|
+
**Boolean type hierarchy**
|
|
10
|
+
|
|
11
|
+
.. graphviz::
|
|
12
|
+
|
|
13
|
+
digraph Booleans {
|
|
14
|
+
bgcolor="#957fb8";
|
|
15
|
+
node [style=filled, fillcolor="#181616", fontcolor="#dcd7ba"];
|
|
16
|
+
edge [color="#181616", fontcolor="#dcd7ba"];
|
|
17
|
+
int -> bool;
|
|
18
|
+
int -> SBool;
|
|
19
|
+
SBool -> "FBool[H1]";
|
|
20
|
+
SBool -> "FBool[H2]";
|
|
21
|
+
SBool -> "FBool[H3]";
|
|
22
|
+
SBool -> TF_Bool;
|
|
23
|
+
TF_Bool -> T_Bool;
|
|
24
|
+
TF_Bool -> F_Bool;
|
|
25
|
+
}
|
pythonic_fp_booleans-3.0.1/docs/index_release.rst → pythonic_fp_booleans-4.0.0/docs/source/index.rst
RENAMED
|
@@ -2,12 +2,12 @@ pythonic-fp-booleans
|
|
|
2
2
|
====================
|
|
3
3
|
|
|
4
4
|
Project
|
|
5
|
-
`
|
|
5
|
+
`Pythonic FP - Booleans <https://pypi.org/project/pythonic-fp-booleans/>`_
|
|
6
6
|
one of the
|
|
7
7
|
`Pythonic FP <https://grscheller.github.io/pythonic-fp/>`_
|
|
8
8
|
PyPI projects.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|RELEASE_STRING|
|
|
11
11
|
|
|
12
12
|
.. toctree::
|
|
13
13
|
:caption: Overview
|
|
@@ -27,4 +27,4 @@ PyPI projects.
|
|
|
27
27
|
:caption: API Documentation
|
|
28
28
|
:maxdepth: 1
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
api/index
|
|
@@ -8,7 +8,11 @@ PyPI releases
|
|
|
8
8
|
+======================================================================================+==============+
|
|
9
9
|
| `development <https://grscheller.github.io/pythonic-fp-booleans/development/html/>`_ | |
|
|
10
10
|
+--------------------------------------------------------------------------------------+--------------+
|
|
11
|
-
| `
|
|
11
|
+
| `v4.0.0 <https://grscheller.github.io/pythonic-fp-booleans/release/html/>`_ | 2026-05-18 |
|
|
12
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
13
|
+
| v3.0.2 | 2026-04-25 |
|
|
14
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
15
|
+
| v3.0.0 | 2026-01-12 |
|
|
12
16
|
+--------------------------------------------------------------------------------------+--------------+
|
|
13
17
|
| v2.1.0 | 2025-12-02 |
|
|
14
18
|
+--------------------------------------------------------------------------------------+--------------+
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["flit_core>=3.12,<4"]
|
|
3
|
+
build-backend = "flit_core.buildapi"
|
|
4
|
+
|
|
1
5
|
[project]
|
|
2
6
|
name = "pythonic-fp-booleans"
|
|
3
|
-
version = "
|
|
7
|
+
version = "4.0.0"
|
|
4
8
|
readme = "README.rst"
|
|
5
9
|
requires-python = ">=3.13"
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
authors = [
|
|
11
|
+
{ name = "Geoffrey R. Scheller", email = "geoffrey@scheller.com" },
|
|
12
|
+
]
|
|
8
13
|
keywords = [
|
|
9
14
|
"booleans",
|
|
10
15
|
"subtypable",
|
|
@@ -15,7 +20,7 @@ classifiers = [
|
|
|
15
20
|
"Intended Audience :: Developers",
|
|
16
21
|
"License :: OSI Approved :: Apache Software License",
|
|
17
22
|
"Operating System :: OS Independent",
|
|
18
|
-
"Programming Language :: Python :: 3.
|
|
23
|
+
"Programming Language :: Python :: 3.14",
|
|
19
24
|
"Typing :: Typed",
|
|
20
25
|
]
|
|
21
26
|
dependencies = [
|
|
@@ -25,8 +30,8 @@ dynamic = ["description"]
|
|
|
25
30
|
|
|
26
31
|
[project.urls]
|
|
27
32
|
Changelog = "https://github.com/grscheller/pythonic-fp-booleans/blob/main/CHANGELOG.rst"
|
|
28
|
-
Documentation = "https://grscheller.github.io/pythonic-fp/booleans
|
|
29
|
-
Homepage = "https://grscheller.github.io/pythonic-fp/
|
|
33
|
+
Documentation = "https://grscheller.github.io/pythonic-fp/projects/booleans.html"
|
|
34
|
+
Homepage = "https://grscheller.github.io/pythonic-fp/"
|
|
30
35
|
Source = "https://github.com/grscheller/pythonic-fp-booleans"
|
|
31
36
|
|
|
32
37
|
[project.optional-dependencies]
|
|
@@ -34,10 +39,6 @@ test = [
|
|
|
34
39
|
"pytest>=8.4.1",
|
|
35
40
|
]
|
|
36
41
|
|
|
37
|
-
[build-system]
|
|
38
|
-
requires = ["flit_core>=3.12,<4"]
|
|
39
|
-
build-backend = "flit_core.buildapi"
|
|
40
|
-
|
|
41
42
|
[tool.flit.module]
|
|
42
43
|
name = "pythonic_fp.booleans"
|
|
43
44
|
|
|
@@ -56,13 +57,15 @@ dmypy = false
|
|
|
56
57
|
strict = true
|
|
57
58
|
report_progress = true
|
|
58
59
|
|
|
59
|
-
[tool.pytest
|
|
60
|
-
addopts =
|
|
60
|
+
[tool.pytest]
|
|
61
|
+
addopts = [
|
|
62
|
+
"-ra",
|
|
63
|
+
]
|
|
61
64
|
consider_namespace_packages = true
|
|
62
65
|
testpaths = ["tests/"]
|
|
63
66
|
|
|
64
67
|
[tool.ruff]
|
|
65
|
-
target-version = "
|
|
68
|
+
target-version = "py314"
|
|
66
69
|
|
|
67
70
|
[tool.ruff.lint.flake8-quotes]
|
|
68
71
|
docstring-quotes = "double"
|
{pythonic_fp_booleans-3.0.1 → pythonic_fp_booleans-4.0.0}/src/pythonic_fp/booleans/__init__.py
RENAMED
|
@@ -13,28 +13,15 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Booleans
|
|
17
|
+
========
|
|
18
18
|
|
|
19
|
-
..
|
|
19
|
+
.. admonition:: Subtypable/subtyped Boolean like classes
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
int -> bool;
|
|
26
|
-
int -> SBool;
|
|
27
|
-
SBool -> "FBool(h1)";
|
|
28
|
-
SBool -> "FBool(h2)";
|
|
29
|
-
SBool -> "FBool(h3)";
|
|
30
|
-
SBool -> TF_Bool;
|
|
31
|
-
TF_Bool -> T_Bool;
|
|
32
|
-
TF_Bool -> F_Bool;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
While still compatible with Python shortcut logic, ``SBool`` and its
|
|
36
|
-
subclasses can be non-shortcut logically composed with Python's bitwise
|
|
37
|
-
operators.
|
|
21
|
+
- Like Python's builtin ``bool``, ``SBool`` and its subclasses
|
|
22
|
+
are threadsafe singletons.
|
|
23
|
+
- While still compatible with Python shortcut logic, these can be
|
|
24
|
+
non-shortcut logically composed with Python's bitwise operators.
|
|
38
25
|
|
|
39
26
|
"""
|
|
40
27
|
|