pythonic-fp-booleans 3.0.0__tar.gz → 3.0.1__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/.github/workflows/static.yml +59 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/.gitignore +4 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/CHANGELOG.rst +10 -1
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/PKG-INFO +2 -2
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/README.rst +1 -1
- pythonic_fp_booleans-3.0.1/docs/Makefile +69 -0
- pythonic_fp_booleans-3.0.1/docs/build/index.html +44 -0
- pythonic_fp_booleans-3.0.1/docs/build/style.css +44 -0
- pythonic_fp_booleans-3.0.1/docs/conf_custom.py +68 -0
- pythonic_fp_booleans-3.0.1/docs/conf_devel.py +68 -0
- pythonic_fp_booleans-3.0.1/docs/conf_release.py +68 -0
- pythonic_fp_booleans-3.0.1/docs/index_custom.rst +30 -0
- pythonic_fp_booleans-3.0.1/docs/index_devel.rst +30 -0
- pythonic_fp_booleans-3.0.1/docs/index_release.rst +30 -0
- pythonic_fp_booleans-3.0.1/docs/requirements.txt +2 -0
- pythonic_fp_booleans-3.0.1/docs/source/changelog.rst +7 -0
- pythonic_fp_booleans-3.0.1/docs/source/description.rst +7 -0
- pythonic_fp_booleans-3.0.1/docs/source/docs/flavored.rst +4 -0
- pythonic_fp_booleans-3.0.1/docs/source/docs/index.rst +15 -0
- pythonic_fp_booleans-3.0.1/docs/source/docs/subtypable.rst +8 -0
- pythonic_fp_booleans-3.0.1/docs/source/docs/truthy_falsy.rst +4 -0
- pythonic_fp_booleans-3.0.1/docs/source/releases.rst +24 -0
- pythonic_fp_booleans-3.0.1/docs/source/usage.rst +63 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/pyproject.toml +5 -4
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/__init__.py +1 -1
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/flavored.py +7 -3
- pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/py.typed +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/subtypable.py +25 -23
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/truthy_falsy.py +30 -11
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/LICENSE +0 -0
- /pythonic_fp_booleans-3.0.0/src/pythonic_fp/booleans/__init__.pyi → /pythonic_fp_booleans-3.0.1/docs/build/.nojekyll +0 -0
- /pythonic_fp_booleans-3.0.0/src/pythonic_fp/booleans/py.typed → /pythonic_fp_booleans-3.0.1/src/pythonic_fp/booleans/__init__.pyi +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/flavored.pyi +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/subtypable.pyi +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/truthy_falsy.pyi +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_bool_vs_fbool.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_bool_vs_sbool.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_flavored.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_flavored_non_shortcut_logic.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_flavored_sbool.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_subtypable_non_shortcut_logic.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_true_false.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_true_false_non_shortcut_logic.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_typing.py +0 -0
- {pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_variance.py +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Build and Deploy Furo Themed Sphinx Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "pages"
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
environment:
|
|
21
|
+
name: github-pages
|
|
22
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v6
|
|
26
|
+
|
|
27
|
+
- name: Select Python
|
|
28
|
+
uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.14'
|
|
31
|
+
|
|
32
|
+
- name: Install Sphinx Dependencies
|
|
33
|
+
run: pip install -r docs/requirements.txt
|
|
34
|
+
|
|
35
|
+
- name: Build release docs
|
|
36
|
+
run: |
|
|
37
|
+
pip install pythonic-fp-booleans
|
|
38
|
+
cp docs/index_release.rst docs/source/index.rst
|
|
39
|
+
cp docs/conf_release.py docs/source/conf.py
|
|
40
|
+
sphinx-build -M html docs/source docs/build/release
|
|
41
|
+
|
|
42
|
+
- name: Build development docs
|
|
43
|
+
run: |
|
|
44
|
+
pip install -e .
|
|
45
|
+
cp docs/index_devel.rst docs/source/index.rst
|
|
46
|
+
cp docs/conf_devel.py docs/source/conf.py
|
|
47
|
+
sphinx-build -M html docs/source docs/build/development
|
|
48
|
+
|
|
49
|
+
- name: Setup Pages
|
|
50
|
+
uses: actions/configure-pages@v6
|
|
51
|
+
|
|
52
|
+
- name: Upload Artifact
|
|
53
|
+
uses: actions/upload-pages-artifact@v5
|
|
54
|
+
with:
|
|
55
|
+
path: docs/build
|
|
56
|
+
|
|
57
|
+
- name: Deploy to GitHub Pages
|
|
58
|
+
uses: actions/deploy-pages@v5
|
|
59
|
+
id: deployment
|
|
@@ -17,7 +17,16 @@ See `Semantic Versioning 2.0.0 <https://semver.org>`_.
|
|
|
17
17
|
Releases and Important Milestones
|
|
18
18
|
---------------------------------
|
|
19
19
|
|
|
20
|
-
PyPI
|
|
20
|
+
PyPI 3.0.1 - 2025-12-02
|
|
21
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
22
|
+
|
|
23
|
+
The pythonic-fp-booleans GitHub repo now will be automatically
|
|
24
|
+
building the current release documentation and the latest development
|
|
25
|
+
documentation on GitHub for display on the project's GitHub Pages.
|
|
26
|
+
|
|
27
|
+
Substantial documentation improvements.
|
|
28
|
+
|
|
29
|
+
PyPI 3.0.0 - 2025-12-02
|
|
21
30
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
22
31
|
|
|
23
32
|
Docstring updates.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pythonic-fp-booleans
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: Subtypable Boolean Class Hierarchy
|
|
5
5
|
Keywords: booleans,subtypable
|
|
6
6
|
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
@@ -44,7 +44,7 @@ Documentation
|
|
|
44
44
|
|
|
45
45
|
Documentation for this project is hosted on
|
|
46
46
|
`GitHub Pages
|
|
47
|
-
<https://grscheller.github.io/pythonic-fp
|
|
47
|
+
<https://grscheller.github.io/pythonic-fp-booleans>`_.
|
|
48
48
|
|
|
49
49
|
Copyright and License
|
|
50
50
|
---------------------
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
# Important Note: "make devel" and "make release" will just
|
|
4
|
+
# use the first pythonic_fp.circulararray package found.
|
|
5
|
+
|
|
6
|
+
# You can set these variables from the command line, and also
|
|
7
|
+
# from the environment for the first two.
|
|
8
|
+
SPHINXOPTS ?=
|
|
9
|
+
SPHINXBUILD ?= sphinx-build
|
|
10
|
+
SOURCEDIR = source
|
|
11
|
+
BUILDDIR = build
|
|
12
|
+
|
|
13
|
+
STATICDIR = source/_static
|
|
14
|
+
TEMPLATEDIR = source/_templates
|
|
15
|
+
|
|
16
|
+
# Put it first so that "make" without argument is like "make help".
|
|
17
|
+
help:
|
|
18
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
|
|
19
|
+
|
|
20
|
+
setup_init: Makefile
|
|
21
|
+
mkdir -p $(STATICDIR) $(TEMPLATEDIR)
|
|
22
|
+
|
|
23
|
+
setup_devel: setup_init
|
|
24
|
+
rm -rf "$(BUILDDIR)"/development
|
|
25
|
+
cp index_devel.rst "$(SOURCEDIR)"/index.rst
|
|
26
|
+
cp conf_devel.py "$(SOURCEDIR)"/conf.py
|
|
27
|
+
|
|
28
|
+
setup_release: setup_init
|
|
29
|
+
rm -rf "$(BUILDDIR)"/release
|
|
30
|
+
cp index_release.rst "$(SOURCEDIR)"/index.rst
|
|
31
|
+
cp conf_release.py "$(SOURCEDIR)"/conf.py
|
|
32
|
+
|
|
33
|
+
setup_custom: setup_init
|
|
34
|
+
rm -rf "$(BUILDDIR)"/custom
|
|
35
|
+
cp index_custom.rst "$(SOURCEDIR)"/index.rst
|
|
36
|
+
cp conf_custom.py "$(SOURCEDIR)"/conf.py
|
|
37
|
+
|
|
38
|
+
clean_source: Makefile
|
|
39
|
+
@rm -f "$(SOURCEDIR)"/conf.py "$(SOURCEDIR)"/index.rst
|
|
40
|
+
|
|
41
|
+
clean_devel: clean_source
|
|
42
|
+
@rm -rf "$(BUILDDIR)"/development
|
|
43
|
+
|
|
44
|
+
clean_release: clean_source
|
|
45
|
+
@rm -rf "$(BUILDDIR)"/release
|
|
46
|
+
|
|
47
|
+
clean_custom: clean_source
|
|
48
|
+
@rm -rf "$(BUILDDIR)"/custom
|
|
49
|
+
|
|
50
|
+
clean: clean_devel clean_release clean_custom
|
|
51
|
+
@echo Removed all doc build artifacts.
|
|
52
|
+
|
|
53
|
+
.PHONY: help Makefile
|
|
54
|
+
.PHONY: setup_init setup_devel setup_release
|
|
55
|
+
.PHONY: devel release
|
|
56
|
+
.PHONY: clean_source clean_devel clean_release clean
|
|
57
|
+
|
|
58
|
+
# Build development labeled html docs.
|
|
59
|
+
devel: setup_devel
|
|
60
|
+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"/development $(SPHINXOPTS)
|
|
61
|
+
|
|
62
|
+
# Build release labeled html docs.
|
|
63
|
+
release: setup_release
|
|
64
|
+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"/release $(SPHINXOPTS)
|
|
65
|
+
|
|
66
|
+
# Catch-all target: route all unknown targets to Sphinx and save to $(BUILDDIR)/custom.
|
|
67
|
+
# Use conf_custom.py and index_custom.html to configure.
|
|
68
|
+
%: Makefile setup_custom
|
|
69
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)"/custom $(SPHINXOPTS)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<title>PyPI Project: pythonic-fp-booleans</title>
|
|
7
|
+
<link rel="stylesheet" href="style.css" />
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<table>
|
|
12
|
+
<tr>
|
|
13
|
+
<td>
|
|
14
|
+
<h3>Pythonic FP Booleans</h3>
|
|
15
|
+
<dl>
|
|
16
|
+
<dt>Booleans - pythonic-fp-booleans:</dt>
|
|
17
|
+
<dd><a href="https://pypi.org/project/pythonic-fp-booleans/"> PyPI</a></dd>
|
|
18
|
+
<dd><a href="https://github.com/grscheller/pythonic-fp-booleans"> GitHub</a></dd>
|
|
19
|
+
</dl>
|
|
20
|
+
|
|
21
|
+
<dl>
|
|
22
|
+
<dt>Booleans Documentation:</dt>
|
|
23
|
+
<dd><a href="https://grscheller.github.io/pythonic-fp-booleans/release/html/"> Latest release</a></dd>
|
|
24
|
+
<dd><a href="https://grscheller.github.io/pythonic-fp-booleans/development/html/"> Development</a></dd>
|
|
25
|
+
</dl>
|
|
26
|
+
</td>
|
|
27
|
+
|
|
28
|
+
<td>
|
|
29
|
+
<h3>Related PyPI Projects</h3>
|
|
30
|
+
<dl>
|
|
31
|
+
<dt>Pythonic Functional Programming:</dt>
|
|
32
|
+
<dd><a href="https://grscheller.github.io/pythonic-fp/"> Pythonic FP Homepage</a></dd>
|
|
33
|
+
</dl>
|
|
34
|
+
|
|
35
|
+
<dl>
|
|
36
|
+
<dt>Daddy's Boring Math Library :</dt>
|
|
37
|
+
<dd><a href="https://grscheller.github.io/boring-math/"> Boring Math Homepage</a></dd>
|
|
38
|
+
</dl>
|
|
39
|
+
</td>
|
|
40
|
+
</tr>
|
|
41
|
+
</table>
|
|
42
|
+
</body>
|
|
43
|
+
|
|
44
|
+
</html>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
body {
|
|
2
|
+
color: #c5c9c5;
|
|
3
|
+
background-color: #181616;
|
|
4
|
+
font-family: cantarell,liberation,arial,helvetica,sans-serif
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
a:link {
|
|
8
|
+
color: #6884c0;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
a:visited {
|
|
13
|
+
color: #7e9cd8;
|
|
14
|
+
text-decoration: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a:hover {
|
|
18
|
+
text-decoration: underline;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
h3 {
|
|
22
|
+
color: #b6927b;
|
|
23
|
+
margin-left: 20px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
table {
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
td {
|
|
31
|
+
vertical-align: top;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
dt {
|
|
35
|
+
color: #acafac;
|
|
36
|
+
margin-left: 20px;
|
|
37
|
+
margin-top: 5px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
dd {
|
|
41
|
+
color: #c5c9c5;
|
|
42
|
+
margin-left: 20px;
|
|
43
|
+
padding-left: 15px;
|
|
44
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# https://www.sphinx-doc.org/en/master/usage/index.html
|
|
4
|
+
#
|
|
5
|
+
# Must match what is in pyproject.toml, also delete "Proposed"
|
|
6
|
+
# in the release string in source/index.rst when generating
|
|
7
|
+
# the docs for an actual, not proposed, release.
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
from sphinx.application import Sphinx
|
|
11
|
+
|
|
12
|
+
project = 'Pythonic FP - Booleans'
|
|
13
|
+
copyright = '2023-2026, Geoffrey R. Scheller'
|
|
14
|
+
author = 'Geoffrey R. Scheller'
|
|
15
|
+
release = '0.0.0'
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def skip_abc_methods(
|
|
19
|
+
app: Any, what: str, name: str, obj: Any, skip: bool, options: Any
|
|
20
|
+
) -> bool:
|
|
21
|
+
if name in [
|
|
22
|
+
'__init_subclass__',
|
|
23
|
+
'__subclasshook__',
|
|
24
|
+
'__class_getitem__',
|
|
25
|
+
'__weakref__',
|
|
26
|
+
]:
|
|
27
|
+
return True # Skip these members
|
|
28
|
+
return skip
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def setup(app: Sphinx) -> None:
|
|
32
|
+
app.connect('autodoc-skip-member', skip_abc_methods)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
extensions = [
|
|
36
|
+
'sphinx.ext.autodoc',
|
|
37
|
+
'sphinx.ext.graphviz',
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
autodoc_default_options = {
|
|
41
|
+
'members': True,
|
|
42
|
+
'private-members': True,
|
|
43
|
+
'special-members': True,
|
|
44
|
+
'inherited-members': False,
|
|
45
|
+
'show-inheritance': True,
|
|
46
|
+
}
|
|
47
|
+
autodoc_member_order = 'bysource'
|
|
48
|
+
autoclass_content = 'both'
|
|
49
|
+
autodoc_class_signature = 'separated'
|
|
50
|
+
autodoc_typehints_format = 'short'
|
|
51
|
+
autodoc_use_type_comments = True
|
|
52
|
+
autodoc_docstring_signature = False
|
|
53
|
+
autodoc_preserve_defaults = True
|
|
54
|
+
autodoc_warningiserror = False
|
|
55
|
+
|
|
56
|
+
templates_path = ['_templates']
|
|
57
|
+
exclude_patterns: list[str] = []
|
|
58
|
+
|
|
59
|
+
html_theme_options = {
|
|
60
|
+
'light_css_variables': {
|
|
61
|
+
'color-link--visited': 'var(--color-link)',
|
|
62
|
+
},
|
|
63
|
+
'dark_css_variables': {
|
|
64
|
+
'color-link--visited': 'var(--color-link)',
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
html_theme = 'furo'
|
|
68
|
+
html_static_path = ['_static']
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# https://www.sphinx-doc.org/en/master/usage/index.html
|
|
4
|
+
#
|
|
5
|
+
# Must match what is in pyproject.toml, also delete "Proposed"
|
|
6
|
+
# in the release string in source/index.rst when generating
|
|
7
|
+
# the docs for an actual, not proposed, release.
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
from sphinx.application import Sphinx
|
|
11
|
+
|
|
12
|
+
project = 'Pythonic FP - Booleans'
|
|
13
|
+
copyright = '2023-2026, Geoffrey R. Scheller'
|
|
14
|
+
author = 'Geoffrey R. Scheller'
|
|
15
|
+
release = '3.0.1'
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def skip_abc_methods(
|
|
19
|
+
app: Any, what: str, name: str, obj: Any, skip: bool, options: Any
|
|
20
|
+
) -> bool:
|
|
21
|
+
if name in [
|
|
22
|
+
'__init_subclass__',
|
|
23
|
+
'__subclasshook__',
|
|
24
|
+
'__class_getitem__',
|
|
25
|
+
'__weakref__',
|
|
26
|
+
]:
|
|
27
|
+
return True # Skip these members
|
|
28
|
+
return skip
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def setup(app: Sphinx) -> None:
|
|
32
|
+
app.connect('autodoc-skip-member', skip_abc_methods)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
extensions = [
|
|
36
|
+
'sphinx.ext.autodoc',
|
|
37
|
+
'sphinx.ext.graphviz',
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
autodoc_default_options = {
|
|
41
|
+
'members': True,
|
|
42
|
+
'private-members': True,
|
|
43
|
+
'special-members': True,
|
|
44
|
+
'inherited-members': False,
|
|
45
|
+
'show-inheritance': True,
|
|
46
|
+
}
|
|
47
|
+
autodoc_member_order = 'bysource'
|
|
48
|
+
autoclass_content = 'both'
|
|
49
|
+
autodoc_class_signature = 'separated'
|
|
50
|
+
autodoc_typehints_format = 'short'
|
|
51
|
+
autodoc_use_type_comments = True
|
|
52
|
+
autodoc_docstring_signature = False
|
|
53
|
+
autodoc_preserve_defaults = True
|
|
54
|
+
autodoc_warningiserror = False
|
|
55
|
+
|
|
56
|
+
templates_path = ['_templates']
|
|
57
|
+
exclude_patterns: list[str] = []
|
|
58
|
+
|
|
59
|
+
html_theme_options = {
|
|
60
|
+
'light_css_variables': {
|
|
61
|
+
'color-link--visited': 'var(--color-link)',
|
|
62
|
+
},
|
|
63
|
+
'dark_css_variables': {
|
|
64
|
+
'color-link--visited': 'var(--color-link)',
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
html_theme = 'furo'
|
|
68
|
+
html_static_path = ['_static']
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# https://www.sphinx-doc.org/en/master/usage/index.html
|
|
4
|
+
#
|
|
5
|
+
# Must match what is in pyproject.toml, also delete "Proposed"
|
|
6
|
+
# in the release string in source/index.rst when generating
|
|
7
|
+
# the docs for an actual, not proposed, release.
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
from sphinx.application import Sphinx
|
|
11
|
+
|
|
12
|
+
project = 'Pythonic FP - Booleans'
|
|
13
|
+
copyright = '2023-2026, Geoffrey R. Scheller'
|
|
14
|
+
author = 'Geoffrey R. Scheller'
|
|
15
|
+
release = '3.0.0'
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def skip_abc_methods(
|
|
19
|
+
app: Any, what: str, name: str, obj: Any, skip: bool, options: Any
|
|
20
|
+
) -> bool:
|
|
21
|
+
if name in [
|
|
22
|
+
'__init_subclass__',
|
|
23
|
+
'__subclasshook__',
|
|
24
|
+
'__class_getitem__',
|
|
25
|
+
'__weakref__',
|
|
26
|
+
]:
|
|
27
|
+
return True # Skip these members
|
|
28
|
+
return skip
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def setup(app: Sphinx) -> None:
|
|
32
|
+
app.connect('autodoc-skip-member', skip_abc_methods)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
extensions = [
|
|
36
|
+
'sphinx.ext.autodoc',
|
|
37
|
+
'sphinx.ext.graphviz',
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
autodoc_default_options = {
|
|
41
|
+
'members': True,
|
|
42
|
+
'private-members': True,
|
|
43
|
+
'special-members': True,
|
|
44
|
+
'inherited-members': False,
|
|
45
|
+
'show-inheritance': True,
|
|
46
|
+
}
|
|
47
|
+
autodoc_member_order = 'bysource'
|
|
48
|
+
autoclass_content = 'both'
|
|
49
|
+
autodoc_class_signature = 'separated'
|
|
50
|
+
autodoc_typehints_format = 'short'
|
|
51
|
+
autodoc_use_type_comments = True
|
|
52
|
+
autodoc_docstring_signature = False
|
|
53
|
+
autodoc_preserve_defaults = True
|
|
54
|
+
autodoc_warningiserror = False
|
|
55
|
+
|
|
56
|
+
templates_path = ['_templates']
|
|
57
|
+
exclude_patterns: list[str] = []
|
|
58
|
+
|
|
59
|
+
html_theme_options = {
|
|
60
|
+
'light_css_variables': {
|
|
61
|
+
'color-link--visited': 'var(--color-link)',
|
|
62
|
+
},
|
|
63
|
+
'dark_css_variables': {
|
|
64
|
+
'color-link--visited': 'var(--color-link)',
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
html_theme = 'furo'
|
|
68
|
+
html_static_path = ['_static']
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
pythonic-fp-booleans
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Project
|
|
5
|
+
`pythonic-fp-booleans <https://pypi.org/project/pythonic-fp-booleans/>`_
|
|
6
|
+
one of the
|
|
7
|
+
`Pythonic FP <https://grscheller.github.io/pythonic-fp/>`_
|
|
8
|
+
PyPI projects.
|
|
9
|
+
|
|
10
|
+
**Custom PyPI 0.0.0 release**
|
|
11
|
+
|
|
12
|
+
.. toctree::
|
|
13
|
+
:caption: Overview
|
|
14
|
+
:hidden:
|
|
15
|
+
|
|
16
|
+
self
|
|
17
|
+
|
|
18
|
+
.. toctree::
|
|
19
|
+
:caption: User Documentation
|
|
20
|
+
|
|
21
|
+
description
|
|
22
|
+
usage
|
|
23
|
+
releases
|
|
24
|
+
changelog
|
|
25
|
+
|
|
26
|
+
.. toctree::
|
|
27
|
+
:caption: API Documentation
|
|
28
|
+
:maxdepth: 1
|
|
29
|
+
|
|
30
|
+
docs/index
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
pythonic-fp-booleans
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Project
|
|
5
|
+
`pythonic-fp-booleans <https://pypi.org/project/pythonic-fp-booleans/>`_
|
|
6
|
+
one of the
|
|
7
|
+
`Pythonic FP <https://grscheller.github.io/pythonic-fp/>`_
|
|
8
|
+
PyPI projects.
|
|
9
|
+
|
|
10
|
+
**Proposed PyPI 3.0.1 release**
|
|
11
|
+
|
|
12
|
+
.. toctree::
|
|
13
|
+
:caption: Overview
|
|
14
|
+
:hidden:
|
|
15
|
+
|
|
16
|
+
self
|
|
17
|
+
|
|
18
|
+
.. toctree::
|
|
19
|
+
:caption: User Documentation
|
|
20
|
+
|
|
21
|
+
description
|
|
22
|
+
usage
|
|
23
|
+
releases
|
|
24
|
+
changelog
|
|
25
|
+
|
|
26
|
+
.. toctree::
|
|
27
|
+
:caption: API Documentation
|
|
28
|
+
:maxdepth: 1
|
|
29
|
+
|
|
30
|
+
docs/index
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
pythonic-fp-booleans
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Project
|
|
5
|
+
`pythonic-fp-booleans <https://pypi.org/project/pythonic-fp-booleans/>`_
|
|
6
|
+
one of the
|
|
7
|
+
`Pythonic FP <https://grscheller.github.io/pythonic-fp/>`_
|
|
8
|
+
PyPI projects.
|
|
9
|
+
|
|
10
|
+
**PyPI 3.0.0 release**
|
|
11
|
+
|
|
12
|
+
.. toctree::
|
|
13
|
+
:caption: Overview
|
|
14
|
+
:hidden:
|
|
15
|
+
|
|
16
|
+
self
|
|
17
|
+
|
|
18
|
+
.. toctree::
|
|
19
|
+
:caption: User Documentation
|
|
20
|
+
|
|
21
|
+
description
|
|
22
|
+
usage
|
|
23
|
+
releases
|
|
24
|
+
changelog
|
|
25
|
+
|
|
26
|
+
.. toctree::
|
|
27
|
+
:caption: API Documentation
|
|
28
|
+
:maxdepth: 1
|
|
29
|
+
|
|
30
|
+
docs/index
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
PyPI releases
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
**pythonic-fp-booleans:** pythonic_fp.booleans
|
|
5
|
+
|
|
6
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
7
|
+
| PyPI Release | Release Date |
|
|
8
|
+
+======================================================================================+==============+
|
|
9
|
+
| `development <https://grscheller.github.io/pythonic-fp-booleans/development/html/>`_ | |
|
|
10
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
11
|
+
| `v3.0.0 <https://grscheller.github.io/pythonic-fp-booleans/release/html/>`_ | 2026-01-12 |
|
|
12
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
13
|
+
| v2.1.0 | 2025-12-02 |
|
|
14
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
15
|
+
| v2.0.0 | 2025-09-27 |
|
|
16
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
17
|
+
| v1.1.2 | 2025-09-09 |
|
|
18
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
19
|
+
| v1.1.1 | 2025-09-03 |
|
|
20
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
21
|
+
| v1.1.0 | 2025-09-02 |
|
|
22
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
23
|
+
| v1.0.0 (pythonic-fp-singletons) | 2025-08-02 |
|
|
24
|
+
+--------------------------------------------------------------------------------------+--------------+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Usage
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
How to installing the package
|
|
5
|
+
-----------------------------
|
|
6
|
+
|
|
7
|
+
Install the project into your Python environment:
|
|
8
|
+
|
|
9
|
+
.. code:: console
|
|
10
|
+
|
|
11
|
+
$ pip install pythonic-fp.booleans
|
|
12
|
+
|
|
13
|
+
Importing the package
|
|
14
|
+
---------------------
|
|
15
|
+
|
|
16
|
+
Import package booleans classes, functions and constants into your code.
|
|
17
|
+
|
|
18
|
+
.. code:: python
|
|
19
|
+
|
|
20
|
+
from pythonic_fp.booleans.subtypable SBool, snot, TRUTH, LIE
|
|
21
|
+
|
|
22
|
+
from pythonic_fp.booleans.subtypes.flavored FBool, truthy, falsy
|
|
23
|
+
|
|
24
|
+
from pythonic_fp.booleans.subtypes.truthy_falsy TF_Booleans
|
|
25
|
+
from pythonic_fp.booleans.subtypes.truthy_falsy TF_Bool, T_Bool, F_Bool
|
|
26
|
+
from pythonic_fp.booleans.subtypes.truthy_falsy ALWAYS, NEVER_EVER
|
|
27
|
+
|
|
28
|
+
Best practices
|
|
29
|
+
--------------
|
|
30
|
+
|
|
31
|
+
Subtypable Booleans
|
|
32
|
+
~~~~~~~~~~~~~~~~~~~
|
|
33
|
+
|
|
34
|
+
- use the ``~`` to return the same ``SBool`` subtype but of the opposite truthiness
|
|
35
|
+
|
|
36
|
+
- Python's ``not`` operator always returns a ``bool``
|
|
37
|
+
|
|
38
|
+
- constants ``TRUTH`` and ``LIE`` are the unique truthy and falsy ``SBool`` values
|
|
39
|
+
|
|
40
|
+
Flavored Booleans
|
|
41
|
+
~~~~~~~~~~~~~~~~~
|
|
42
|
+
|
|
43
|
+
- functions ``truthy`` and ``falsy`` take any hashable value called its flavor
|
|
44
|
+
- they return the unique truthy or falsy ``FBool`` respectively of that flavor
|
|
45
|
+
|
|
46
|
+
Truthy_Falsy Booleans
|
|
47
|
+
~~~~~~~~~~~~~~~~~~~~~
|
|
48
|
+
|
|
49
|
+
- use ``TF_Booleans = T_Bool | F_Bool | TF_Bool`` only as a type
|
|
50
|
+
- directly use ``T_Bool``, ``F_Bool``, ``TF_Bool`` as the type constructors
|
|
51
|
+
- constants ``ALWAYS`` and ``Never`` are the unique ``TS_Bool`` truthy and falsy values
|
|
52
|
+
|
|
53
|
+
- but they are distinct subtypes of ``TS_Bool``
|
|
54
|
+
|
|
55
|
+
- for ``TS_Bool`` we have
|
|
56
|
+
|
|
57
|
+
- ``type(ALWAYS) is T_Bool``
|
|
58
|
+
- ``type(NEVER) is F_Bool``
|
|
59
|
+
|
|
60
|
+
- while for ``bool`` we have
|
|
61
|
+
|
|
62
|
+
- ``type(True) is bool``
|
|
63
|
+
- ``type(False) is bool``
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pythonic-fp-booleans"
|
|
3
|
-
version = "3.0.
|
|
3
|
+
version = "3.0.1"
|
|
4
4
|
readme = "README.rst"
|
|
5
5
|
requires-python = ">=3.13"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -42,9 +42,7 @@ build-backend = "flit_core.buildapi"
|
|
|
42
42
|
name = "pythonic_fp.booleans"
|
|
43
43
|
|
|
44
44
|
[tool.mypy]
|
|
45
|
-
enable_incomplete_feature = "NewGenericSyntax"
|
|
46
45
|
explicit_package_bases = true
|
|
47
|
-
implicit_reexport = false
|
|
48
46
|
local_partial_types = true
|
|
49
47
|
namespace_packages = true
|
|
50
48
|
warn_redundant_casts = true
|
|
@@ -70,7 +68,10 @@ target-version = "py313"
|
|
|
70
68
|
docstring-quotes = "double"
|
|
71
69
|
|
|
72
70
|
[tool.ruff.lint.per-file-ignores]
|
|
73
|
-
"tests
|
|
71
|
+
"tests/**/*.py" = [
|
|
72
|
+
"E731",
|
|
73
|
+
"C901",
|
|
74
|
+
]
|
|
74
75
|
"**/*.py" = ["E741"]
|
|
75
76
|
|
|
76
77
|
[tool.ruff.format]
|
{pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/flavored.py
RENAMED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
.. admonition:: Class Favored Booleans
|
|
16
|
+
.. admonition:: Class Favored Booleans
|
|
17
17
|
|
|
18
18
|
When different flavors of the truth matter. Each ``FBool`` is
|
|
19
19
|
an ``SBool`` subtype corresponds to a hashable value
|
|
20
20
|
called its flavor.
|
|
21
21
|
|
|
22
22
|
.. warning::
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
Combining ``FBool`` instances of different flavors
|
|
25
25
|
with bitwise operators will just result in an ``SBool``.
|
|
26
26
|
|
|
@@ -59,10 +59,11 @@ class FBool(SBool):
|
|
|
59
59
|
:param witness: Determines truthiness of the ``FBool`` instance returned.
|
|
60
60
|
:param flavor: The ``flavor`` of ``FBool`` to created.
|
|
61
61
|
:returns: The truthy or falsy ``FBool`` instance of a particular ``flavor``.
|
|
62
|
+
|
|
62
63
|
"""
|
|
63
64
|
if witness:
|
|
64
65
|
if flavor not in cls._truthy_dict:
|
|
65
|
-
with cls.
|
|
66
|
+
with cls._truthy_dict_lock:
|
|
66
67
|
if flavor not in cls._truthy_dict:
|
|
67
68
|
cls._truthy_dict[flavor] = super(SBool, cls).__new__(cls, True)
|
|
68
69
|
return cls._truthy_dict[flavor]
|
|
@@ -116,6 +117,7 @@ class FBool(SBool):
|
|
|
116
117
|
def flavor(self) -> Hashable:
|
|
117
118
|
"""
|
|
118
119
|
:returns: The flavor of the FBool.
|
|
120
|
+
|
|
119
121
|
"""
|
|
120
122
|
return self._flavor
|
|
121
123
|
|
|
@@ -124,6 +126,7 @@ def truthy(flavor: Hashable) -> FBool:
|
|
|
124
126
|
"""
|
|
125
127
|
:param flavor: Hashable value to determine which singleton ``flavor`` to return.
|
|
126
128
|
:returns: The truthy singleton of a particular ``flavor``.
|
|
129
|
+
|
|
127
130
|
"""
|
|
128
131
|
return FBool(True, flavor)
|
|
129
132
|
|
|
@@ -132,5 +135,6 @@ def falsy(flavor: Hashable) -> FBool:
|
|
|
132
135
|
"""
|
|
133
136
|
:param flavor: Hashable value to determine which singleton ``flavor`` to return.
|
|
134
137
|
:returns: The falsy singleton of a particular ``flavor``.
|
|
138
|
+
|
|
135
139
|
"""
|
|
136
140
|
return FBool(False, flavor)
|
|
File without changes
|
{pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/subtypable.py
RENAMED
|
@@ -13,25 +13,31 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Like Python's built in bool, class ``SBool`` is a subclass of int.
|
|
19
|
-
Unlike bool, this version can be further subclassed.
|
|
20
|
-
|
|
21
|
-
This type and its subtypes can also do (non-shortcut) Boolean logic
|
|
22
|
-
using Python bitwise operators.
|
|
23
|
-
|
|
24
|
-
+-------------------+--------+------------+
|
|
25
|
-
| Boolean operation | symbol | dunder |
|
|
26
|
-
+===================+========+============+
|
|
27
|
-
| not | ``~`` | __invert__ |
|
|
28
|
-
+-------------------+--------+------------+
|
|
29
|
-
| and | ``&`` | __and__ |
|
|
30
|
-
+-------------------+--------+------------+
|
|
31
|
-
| or | ``|`` | __or__ |
|
|
32
|
-
+-------------------+--------+------------+
|
|
33
|
-
| xor | ``^`` | __xor__ |
|
|
34
|
-
+-------------------+--------+------------+
|
|
16
|
+
.. admonition:: Subtypable Boolean
|
|
17
|
+
|
|
18
|
+
Like Python's built in bool, class ``SBool`` is a subclass of int.
|
|
19
|
+
Unlike bool, this version can be further subclassed.
|
|
20
|
+
|
|
21
|
+
This type and its subtypes can also do (non-shortcut) Boolean logic
|
|
22
|
+
using Python bitwise operators.
|
|
23
|
+
|
|
24
|
+
+-------------------+--------+------------+
|
|
25
|
+
| Boolean operation | symbol | dunder |
|
|
26
|
+
+===================+========+============+
|
|
27
|
+
| not | ``~`` | __invert__ |
|
|
28
|
+
+-------------------+--------+------------+
|
|
29
|
+
| and | ``&`` | __and__ |
|
|
30
|
+
+-------------------+--------+------------+
|
|
31
|
+
| or | ``|`` | __or__ |
|
|
32
|
+
+-------------------+--------+------------+
|
|
33
|
+
| xor | ``^`` | __xor__ |
|
|
34
|
+
+-------------------+--------+------------+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
While compatible with Python short-cut logic. Unfortunately,
|
|
38
|
+
the ``not`` operator always returns a ``bool``. Use the
|
|
39
|
+
bitwise ``~`` operator to return an opposite ``SBool``
|
|
40
|
+
class or subclass.
|
|
35
41
|
|
|
36
42
|
.. note::
|
|
37
43
|
|
|
@@ -41,10 +47,6 @@ using Python bitwise operators.
|
|
|
41
47
|
least upper bound in the inheritance graph of the classes of
|
|
42
48
|
the two arguments.
|
|
43
49
|
|
|
44
|
-
While compatible with Python short-cut logic. Unfortunately, the
|
|
45
|
-
``not`` operator always returns a ``bool``. Use the bitwise ``~``
|
|
46
|
-
operator to return an opposite ``SBool`` class or subclass.
|
|
47
|
-
|
|
48
50
|
.. warning::
|
|
49
51
|
|
|
50
52
|
The "bitwise" operators can raise ``TypeError`` exceptions
|
{pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/truthy_falsy.py
RENAMED
|
@@ -13,25 +13,30 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""
|
|
16
|
-
|
|
16
|
+
.. admonition:: Truthy-Falsy Booleans
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
A Boolean implementation whose distinct truthy and falsy
|
|
19
|
+
values are distinct singleton subclasses, not just
|
|
20
|
+
distinct singleton values.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
bitwise operators.
|
|
22
|
+
A subtype of ``SBool``.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
.. tip::
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Logically combine these using Python's bitwise operators.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
.. warning::
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Although these datastructures are completely compatible
|
|
31
|
+
with Python shortcut evaluation, care needs to be taken when
|
|
32
|
+
using them with the ``and``, ``or``, and ``not`` builtins.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
For example, ``~ALWAYS is NEVER`` but ``not ALWAYS is False``
|
|
35
|
+
because ``ALWAYS`` is truthy.
|
|
36
|
+
|
|
37
|
+
Similarly, ``(ALWAYS and False) is False`` while
|
|
38
|
+
``(ALWAYS or False) is ALWAYS``.
|
|
33
39
|
|
|
34
|
-
The subtype of ``TF_Bool`` which is always falsy.
|
|
35
40
|
"""
|
|
36
41
|
|
|
37
42
|
import threading
|
|
@@ -58,6 +63,7 @@ class TF_Bool(SBool):
|
|
|
58
63
|
:param witness: Determines which subtype, ``T_Bool`` or ``F_Bool`` is returned.
|
|
59
64
|
:param flavor: Ignored parameter, only two flavors, one truthy and one falsy.
|
|
60
65
|
:returns: Either The singleton truthy or singleton falsy subtypes.
|
|
66
|
+
|
|
61
67
|
"""
|
|
62
68
|
if witness:
|
|
63
69
|
return T_Bool()
|
|
@@ -97,6 +103,12 @@ class TF_Bool(SBool):
|
|
|
97
103
|
|
|
98
104
|
@final
|
|
99
105
|
class T_Bool(TF_Bool):
|
|
106
|
+
"""
|
|
107
|
+
.. admonition:: The subtype of ``TF_Bool`` which is always truthy
|
|
108
|
+
|
|
109
|
+
A distinct type from F_Bool. A singleton value.
|
|
110
|
+
|
|
111
|
+
"""
|
|
100
112
|
_truthy: 'ClassVar[T_Bool | NoValue]' = _novalue
|
|
101
113
|
_lock: ClassVar[threading.Lock] = threading.Lock()
|
|
102
114
|
|
|
@@ -122,6 +134,12 @@ class T_Bool(TF_Bool):
|
|
|
122
134
|
|
|
123
135
|
@final
|
|
124
136
|
class F_Bool(TF_Bool):
|
|
137
|
+
"""
|
|
138
|
+
.. admonition:: The subtype of ``TF_Bool`` which is always falsy.
|
|
139
|
+
|
|
140
|
+
A distinct type from T_Bool. A singleton value.
|
|
141
|
+
|
|
142
|
+
"""
|
|
125
143
|
_falsy: 'ClassVar[F_Bool | NoValue]' = _novalue
|
|
126
144
|
_lock: ClassVar[threading.Lock] = threading.Lock()
|
|
127
145
|
|
|
@@ -132,6 +150,7 @@ class F_Bool(TF_Bool):
|
|
|
132
150
|
:param witness: Parameter ignored, an ``F_Bool`` is always falsy.
|
|
133
151
|
:param flavor: Parameter ignored, only one falsy "flavor".
|
|
134
152
|
:returns: The falsy ``F_Bool`` singleton instance.
|
|
153
|
+
|
|
135
154
|
"""
|
|
136
155
|
if cls._falsy is _novalue:
|
|
137
156
|
with cls._lock:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/flavored.pyi
RENAMED
|
File without changes
|
{pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/subtypable.pyi
RENAMED
|
File without changes
|
{pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/src/pythonic_fp/booleans/truthy_falsy.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythonic_fp_booleans-3.0.0 → pythonic_fp_booleans-3.0.1}/tests/test_flavored_non_shortcut_logic.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|