Skip to content

make readme examples cleaner #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Add properties to Python enumeration values with a simple declarative syntax. [E
```python

import typing as t
from enum_properties import EnumProperties
from enum_properties import EnumProperties as Enum
from enum import auto

class Color(EnumProperties):
class Color(Enum):

rgb: t.Tuple[int, int, int]
hex: str
Expand Down Expand Up @@ -46,10 +46,10 @@ Properties may also be symmetrically mapped to enumeration values using annotate
```python

import typing as t
from enum_properties import EnumProperties, Symmetric
from enum_properties import EnumProperties as Enum, Symmetric
from enum import auto

class Color(EnumProperties):
class Color(Enum):

rgb: t.Annotated[t.Tuple[int, int, int], Symmetric()]
hex: t.Annotated[str, Symmetric(case_fold=True)]
Expand Down Expand Up @@ -80,9 +80,9 @@ Member functions may also be specialized to each enumeration value, using the ``

```python

from enum_properties import EnumProperties, specialize
from enum_properties import EnumProperties as Enum, specialize

class SpecializedEnum(EnumProperties):
class SpecializedEnum(Enum):

ONE = 1
TWO = 2
Expand Down
Loading