Skip to content

Remove all comments about required and optional attributes#623

Merged
hf-aschloegl merged 2 commits intomainfrom
delete_comments_required_attributes_and_doku
Oct 6, 2023
Merged

Remove all comments about required and optional attributes#623
hf-aschloegl merged 2 commits intomainfrom
delete_comments_required_attributes_and_doku

Conversation

@hf-aschloegl
Copy link
Copy Markdown
Collaborator

and adapt Contribution Readme

Comment on lines 85 to 105

bo_typ: BoTyp = BoTyp.MEINBO
typ: Annotated[Optional[Typ], Field(alias="_typ")] = Typ.MEINBO

# required attributes

#: Der Lieferbeginn beschreibt den Zeitpunkt ab dem (inklusiv) mich ein Versorger seinen Kunden nennen darf
lieferbeginn: datetime
lieferbeginn: Optional[datetime] = None

anzahl_freudenspruenge: int
anzahl_freudenspruenge: Optional[int] = None
"""
Anzahl Freudensprünge beschreibt, wie oft der CEO des Stromkonzerns in die Luft gesprungen ist, als ich den Vertrag unterschrieben habe.
Dieser Wert sollte im Normalfall mindestens 5 sein.
"""

# pylint:disable=unused-argument, no-self-argument
@validator("anzahl_freudenspruenge")
def validate_freudenspruenge(cls, anzahl_freudenspruenge: int, values: Dict[str, Any]) -> int:
if anzahl_freudenspruenge <= 5:
raise ValueError("You are not hyped enough. Do more than 5 joyful leaps.")
return anzahl_freudenspruenge
#: Menge (Elektrische Energie oder Gas oder Wärme), die ich zum Lieferbeginn umsonst erhalte
freimenge: Optional[Menge] = None

# we can help you with anything you might be missing or unable to implement.
# ToDo comments are just fine.
# You don't need to be a perfect programmer to contribute to bo4e :)

# optional attributes

#: Optionale Menge (Elektrische Energie oder Gas oder Wärme), die ich zum Lieferbeginn umsonst erhalte
freimenge: Optional[Menge] = None

```
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hier hab ich noch die Contributing Readme mit den offensichtlichsten Sachen zu alles wird jetzt optional, BoTyp wird zu _typ und keine Validieren mehr angefasst.

@hf-aschloegl hf-aschloegl marked this pull request as ready for review October 6, 2023 13:26
@hf-aschloegl hf-aschloegl merged commit 35421ef into main Oct 6, 2023
@hf-aschloegl hf-aschloegl deleted the delete_comments_required_attributes_and_doku branch October 6, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants