Skip to content

Commit

Permalink
- minor fix
Browse files Browse the repository at this point in the history
- update building method
  • Loading branch information
nicolaspi committed Dec 13, 2024
1 parent 024496e commit e430613
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
4 changes: 2 additions & 2 deletions config_state/config_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,8 @@ def config_summary(self):

def get_nested_config(object: Any):
if isinstance(object, ConfigState):
config = dict([(k, get_nested_config(getattr(object, k)))
for k in object._config_fields.keys()])
config = dict([(k, get_nested_config(v._value_))
for k, v in object._config_fields.items()])
return config
else:
return str(object)
Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "config-state"
version = "1.0.2"
authors = [
{ name = "Nicolas Pinchaud", email = "[email protected]" },
]
description = """
config-state is a Python module that helps implement classes using the ConfigState pattern.
This pattern enhances classes by:
1.Adding structured configuration management
2.Providing state handling capabilities
3.Enabling object creation from configuration files
4.Offering fine-grained control over how objects are serialized and deserialized"""
readme = "README.md"
requires-python = ">=3.7"
dependencies = [
"pyyaml",
]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]

[tool.setuptools.packages.find]
exclude = ["tests", "examples"]
26 changes: 0 additions & 26 deletions setup.py

This file was deleted.

0 comments on commit e430613

Please sign in to comment.