Skip to content
Merged
Show file tree
Hide file tree
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: 8 additions & 4 deletions attrs-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ Let's say we want to override the default value of attribute `b` in a subclass,

```python
@define
class ParentClass():
class ParentClass:
b: int = 2


@define
class ChildClass(ParentClass):
b = 999
Expand All @@ -78,9 +79,10 @@ Instead we need the full attribute definition in the subclass (i.e. with the typ

```python
@define
class ParentClass():
class ParentClass:
b: int = 2


@define
class ChildClass(ParentClass):
b: int = 999
Expand All @@ -96,9 +98,10 @@ In the following example, `b` will have a default value of 2 even with instances

```python
@define
class ParentClass():
class ParentClass:
b: int = 2


# ChildClass missing @define
class ChildClass(ParentClass):
b: int = 999
Expand All @@ -118,7 +121,8 @@ To understand what happening let's look at an example,
@define
class Parent:
a: int
b: bool = True
b: bool = True


@define
class Child(Parent):
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
]
dependencies = [
"deprecated>=1.3.1,<2",
"matplotlib==3.11.1",
"matplotlib>=3.11.2,<4",
"networkx>=3.1,<4",
"numpy>=1.26,<2",
"orjson>=3.9,<4",
Expand Down Expand Up @@ -57,7 +57,7 @@ maintainers = [

[project.urls]
#Homepage = "https://pypi.org/project/PROJECTNAME"
#Documentation = "https://PROJECTNAME.readthedocs.io"
Documentation = "https://bsgip.github.io/echo/"
Repository = "https://github.com/bsip/echo"
Issues = "https://github.com/bsgip/echo/issues"
Changelog = "https://github.com/bsgip/echo/blob/main/CHANGELOG.md"
Expand Down
Loading
Loading