enum-properties 2.2.1__tar.gz → 2.2.3__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.
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.github/workflows/release.yml +1 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/CONTRIBUTING.md +1 -1
- {enum_properties-2.2.1 → enum_properties-2.2.3}/PKG-INFO +1 -1
- {enum_properties-2.2.1 → enum_properties-2.2.3}/doc/source/changelog.rst +13 -1
- {enum_properties-2.2.1 → enum_properties-2.2.3}/doc/source/conf.py +3 -5
- {enum_properties-2.2.1 → enum_properties-2.2.3}/doc/source/tutorial.rst +1 -1
- {enum_properties-2.2.1 → enum_properties-2.2.3}/justfile +2 -2
- {enum_properties-2.2.1 → enum_properties-2.2.3}/pyproject.toml +1 -1
- {enum_properties-2.2.1 → enum_properties-2.2.3}/src/enum_properties/__init__.py +4 -2
- {enum_properties-2.2.1 → enum_properties-2.2.3}/uv.lock +1 -1
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.codecov.yml +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.github/dependabot.yml +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.github/workflows/lint.yml +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.github/workflows/scorecard.yml +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.github/workflows/test.yml +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.gitignore +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/.pre-commit-config.yaml +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/CODE_OF_CONDUCT.md +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/LICENSE +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/README.md +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/SECURITY.md +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/doc/.readthedocs.yaml +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/doc/source/howto.rst +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/doc/source/index.rst +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/doc/source/reference.rst +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/src/enum_properties/py.typed +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/__init__.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_flags.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_interface_eq.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_nestedclass.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_none_coercion.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_perf.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_pickle.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_specialize.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_symmetric.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/annotations/test_type_hints.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/big_enum.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/big_enum_annotations.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/__init__.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/address.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/color_example.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/hash_equiv_def.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_add_props.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_dataclass.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_dataclass_integration.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_flag.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_flag_boundaries.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_flags_no_iterable.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_hash_equiv.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_hash_equiv_def.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_legacy.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_metaclass.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_nested_classes.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_nested_classes_313.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_specialized.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_specialized_default.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_specialized_list.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_specialized_missing.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_symmetric_builtins.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_symmetric_decorator.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_symmetric_metaclass.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_symmetric_overload.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_symmetry.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_verify_unique.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/mapbox.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/specialization_example.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/symmetric_example.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/test_examples.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/__init__.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_flags.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_interface_eq.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_multi_primitives.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_nestedclass.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_none_coercion.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_perf.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_pickle.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_specialize.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/legacy/test_type_hints.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/pickle_enums.py +0 -0
- {enum_properties-2.2.1 → enum_properties-2.2.3}/tests/pickle_enums_annotations.py +0 -0
|
@@ -14,7 +14,7 @@ We provide a platform independent justfile with recipes for all the development
|
|
|
14
14
|
`enum-properties` uses [uv](https://docs.astral.sh/uv) for environment, package and dependency management:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
just
|
|
17
|
+
just install-uv
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Next, initialize and install the development environment:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: enum-properties
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: Add properties and method specializations to Python enumeration values with a simple declarative syntax.
|
|
5
5
|
Project-URL: Homepage, https://github.com/bckohan/enum-properties
|
|
6
6
|
Project-URL: Documentation, https://enum-properties.readthedocs.io
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
Change Log
|
|
3
3
|
==========
|
|
4
4
|
|
|
5
|
+
v2.2.3 (2025-03-14)
|
|
6
|
+
===================
|
|
7
|
+
|
|
8
|
+
* Documentation correction.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
v2.2.2 (2025-03-07)
|
|
12
|
+
===================
|
|
13
|
+
|
|
14
|
+
* Tutorial correction.
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
v2.2.1 (2025-03-07)
|
|
6
18
|
===================
|
|
7
19
|
|
|
@@ -12,7 +24,7 @@ v2.2.0 (2025-03-07)
|
|
|
12
24
|
===================
|
|
13
25
|
|
|
14
26
|
* Fixed `StrEnumProperties is missing from __all__ <https://github.com/bckohan/enum-properties/issues/83>`_
|
|
15
|
-
* Implemented `Test all example code in docs. <https://github.com/bckohan/enum-properties/issues/82
|
|
27
|
+
* Implemented `Test all example code in docs. <https://github.com/bckohan/enum-properties/issues/82>`_
|
|
16
28
|
* Fixed `Symmetric dataclass is missing from __all__ <https://github.com/bckohan/enum-properties/issues/81>`_
|
|
17
29
|
* Implemented `Decorator to make properties symmetric <https://github.com/bckohan/enum-properties/issues/80>`_
|
|
18
30
|
* Implemented `Move to intersphinx references for stdlib types <https://github.com/bckohan/enum-properties/issues/78>`_
|
|
@@ -25,11 +25,9 @@ import enum_properties
|
|
|
25
25
|
|
|
26
26
|
# -- Project information -----------------------------------------------------
|
|
27
27
|
|
|
28
|
-
project =
|
|
29
|
-
copyright =
|
|
30
|
-
author =
|
|
31
|
-
|
|
32
|
-
# The full version, including alpha/beta/rc tags
|
|
28
|
+
project = enum_properties.__title__
|
|
29
|
+
copyright = enum_properties.__copyright__
|
|
30
|
+
author = enum_properties.__author__
|
|
33
31
|
release = enum_properties.__version__
|
|
34
32
|
|
|
35
33
|
|
|
@@ -64,7 +64,7 @@ The last property we've added is the ``uri`` property. We've added it as concret
|
|
|
64
64
|
class because it can be created from the slug and version. We could have specified it in the value
|
|
65
65
|
tuple but that would be very verbose and less
|
|
66
66
|
`DRY <https://en.wikipedia.org/wiki/Don%27t_repeat_yourself>`_. To make this property symmetric we
|
|
67
|
-
|
|
67
|
+
decorate it with :py:func:`~enum_properties.symmetric`.
|
|
68
68
|
|
|
69
69
|
We can use our enumeration like so:
|
|
70
70
|
|
|
@@ -11,12 +11,12 @@ default:
|
|
|
11
11
|
# install the uv package manager
|
|
12
12
|
[linux]
|
|
13
13
|
[macos]
|
|
14
|
-
|
|
14
|
+
install-uv:
|
|
15
15
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
16
16
|
|
|
17
17
|
# install the uv package manager
|
|
18
18
|
[windows]
|
|
19
|
-
|
|
19
|
+
install-uv:
|
|
20
20
|
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
21
21
|
|
|
22
22
|
# setup the venv and pre-commit hooks
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "enum-properties"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.3"
|
|
8
8
|
description = "Add properties and method specializations to Python enumeration values with a simple declarative syntax."
|
|
9
9
|
requires-python = ">=3.8,<4.0"
|
|
10
10
|
authors = [
|
|
@@ -19,7 +19,7 @@ from collections.abc import Generator, Hashable, Iterable
|
|
|
19
19
|
from dataclasses import dataclass
|
|
20
20
|
from functools import cached_property
|
|
21
21
|
|
|
22
|
-
VERSION = (2, 2,
|
|
22
|
+
VERSION = (2, 2, 3)
|
|
23
23
|
|
|
24
24
|
__title__ = "Enum Properties"
|
|
25
25
|
__version__ = ".".join(str(i) for i in VERSION)
|
|
@@ -111,7 +111,9 @@ def symmetric(case_fold: bool = False, match_none: bool = False) -> t.Callable[[
|
|
|
111
111
|
def name(self):
|
|
112
112
|
return "value"
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
|
|
115
|
+
:param case_fold: Pass True to make the property case insensitive
|
|
116
|
+
:param match_none: Pass True to make None values symmetric
|
|
115
117
|
:return: A decorated specialized member method
|
|
116
118
|
"""
|
|
117
119
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{enum_properties-2.2.1 → enum_properties-2.2.3}/tests/examples/howto_dataclass_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|