Skip to content

Commit fe56091

Browse files
committed
fix readme badges
1 parent 1ca1eba commit fe56091

File tree

6 files changed

+37
-7
lines changed

6 files changed

+37
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
[![PyPI status](https://img.shields.io/pypi/status/enum-properties.svg)](https://pypi.python.org/pypi/enum-properties)
88
[![Documentation Status](https://readthedocs.org/projects/enum-properties/badge/?version=latest)](http://enum-properties.readthedocs.io/?badge=latest/)
99
[![Code Cov](https://codecov.io/gh/bckohan/enum-properties/branch/main/graph/badge.svg?token=0IZOKN2DYL)](https://codecov.io/gh/bckohan/enum-properties)
10-
[![Test Status](https://github.com/bckohan/django-enum/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bckohan/enum-properties/actions/workflows/test.yml?query=branch:main)
11-
[![Lint Status](https://github.com/bckohan/django-enum/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/bckohan/enum-properties/actions/workflows/lint.yml?query=branch:main)
10+
[![Test Status](https://github.com/bckohan/enum-properties/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bckohan/enum-properties/actions/workflows/test.yml?query=branch:main)
11+
[![Lint Status](https://github.com/bckohan/enum-properties/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/bckohan/enum-properties/actions/workflows/lint.yml?query=branch:main)
1212

1313
Add properties to Python enumeration values with a simple declarative syntax. [Enum Properties](https://enum-properties.readthedocs.io/en/latest) is a lightweight extension to [Python's Enum class](https://docs.python.org/3/library/enum.html). Example:
1414

doc/source/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Change Log
33
==========
44

5+
v2.2.5 (2025-03-22)
6+
===================
7+
8+
* Fix readme badges.
9+
10+
511
v2.2.4 (2025-03-17)
612
===================
713

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "enum-properties"
7-
version = "2.2.4"
7+
version = "2.2.5"
88
description = "Add properties and method specializations to Python enumeration values with a simple declarative syntax."
99
requires-python = ">=3.8,<4.0"
1010
authors = [

src/enum_properties/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from dataclasses import dataclass
2020
from functools import cached_property
2121

22-
VERSION = (2, 2, 4)
22+
VERSION = (2, 2, 5)
2323

2424
__title__ = "Enum Properties"
2525
__version__ = ".".join(str(i) for i in VERSION)

tests/annotations/test_symmetric.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
from unittest import TestCase
2-
from typing_extensions import Annotated
3-
2+
from enum import property
43
from enum_properties import EnumProperties, symmetric
4+
import sys
5+
6+
if sys.version_info[0:2] >= (3, 11):
7+
from enum import property as enum_property
8+
else:
9+
from types import DynamicClassAttribute as enum_property
510

611

712
class TestSymmetricDecorator(TestCase):
@@ -82,3 +87,22 @@ def label(self):
8287
self.assertTrue(SymEnum(SymEnum.ONE.label) is SymEnum.ONE)
8388
self.assertTrue(SymEnum(SymEnum.TWO.label) is SymEnum.TWO)
8489
self.assertTrue(SymEnum(SymEnum.THREE.label) is SymEnum.THREE)
90+
91+
def test_make_enum_properties_symmetric(self):
92+
class SymEnum(EnumProperties):
93+
ONE = 1
94+
TWO = 2
95+
THREE = 3
96+
97+
@symmetric(case_fold=True)
98+
@enum_property
99+
def label(self):
100+
return self.name
101+
102+
self.assertEqual(SymEnum.ONE.label, "ONE")
103+
self.assertEqual(SymEnum.TWO.label, "TWO")
104+
self.assertEqual(SymEnum.THREE.label, "THREE")
105+
106+
self.assertTrue(SymEnum("one") is SymEnum.ONE)
107+
self.assertTrue(SymEnum("tWo") is SymEnum.TWO)
108+
self.assertTrue(SymEnum("THRee") is SymEnum.THREE)

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)