Skip to content

Commit

Permalink
Refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemisky committed Aug 20, 2023
1 parent 556385d commit dd26587
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def main():
if not tag.startswith('v'):
raise ValueError(f'tag({tag}) not starts with "v"')
print(f'tag: {tag}')
init = Path('src/datclass/__init__.py')
init = Path('src/datclass/__version__.py')
init.write_text(re.sub(
r'^__version__ = [\'"]\d+\.\d+\.\d+[\'"]$',
f"__version__ = '{tag[1:]}'",
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Custom
/.idea/
/main.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# datclass

python dataclass nested & extra
python dataclass nested & extra attrs

Extending the official [dataclass](https://docs.python.org/zh-cn/3/library/dataclasses.html) to support nested and extended fields.

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
{ name = "foyoux" },
]
description = "python package dataclass utils"
keywords = ["dataclass"]
keywords = ["dataclass", "dataclasses", "utils", "nested", "extra", "attrs", "json"]
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
Expand All @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version", "dependencies"]

Expand All @@ -31,7 +32,7 @@ dynamic = ["version", "dependencies"]


[project.scripts]
datclass = "datclass:main"
datclass = "datclass:__main__.main"


[tool.setuptools]
Expand Down
Loading

0 comments on commit dd26587

Please sign in to comment.