Skip to content
Snippets Groups Projects
Commit 48cb609e authored by Felix Blanke's avatar Felix Blanke
Browse files

Fix docstrings

parent fb1905a5
No related branches found
No related tags found
1 merge request!20Check data consistency at import
...@@ -888,7 +888,7 @@ class AK(models.Model): ...@@ -888,7 +888,7 @@ class AK(models.Model):
Get a list of stringified representations of all owners Get a list of stringified representations of all owners
:return: list of owners :return: list of owners
:rtype: List[str] :rtype: list[str]
""" """
return ", ".join(str(owner) for owner in self.owners.all()) return ", ".join(str(owner) for owner in self.owners.all())
...@@ -898,7 +898,7 @@ class AK(models.Model): ...@@ -898,7 +898,7 @@ class AK(models.Model):
Get a list of stringified representations of all durations of associated slots Get a list of stringified representations of all durations of associated slots
:return: list of durations :return: list of durations
:rtype: List[str] :rtype: list[str]
""" """
return ", ".join(str(slot.duration_simplified) for slot in self.akslot_set.select_related('event').all()) return ", ".join(str(slot.duration_simplified) for slot in self.akslot_set.select_related('event').all())
...@@ -1004,12 +1004,12 @@ class Room(models.Model): ...@@ -1004,12 +1004,12 @@ class Room(models.Model):
return self.title return self.title
def as_json_dict(self) -> dict[str, Any]: def as_json_dict(self) -> dict[str, Any]:
"""Return a json string representation of this room object. """Return a json representation of this room object.
:return: The json string representation is constructed :return: The json dict representation is constructed
following the input specification of the KoMa conference optimizer, cf. following the input specification of the KoMa conference optimizer, cf.
https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format
:rtype: str :rtype: dict[str, Any]
""" """
# local import to prevent cyclic import # local import to prevent cyclic import
# pylint: disable=import-outside-toplevel # pylint: disable=import-outside-toplevel
...@@ -1136,12 +1136,12 @@ class AKSlot(models.Model): ...@@ -1136,12 +1136,12 @@ class AKSlot(models.Model):
super().save(force_insert, force_update, using, update_fields) super().save(force_insert, force_update, using, update_fields)
def as_json_dict(self) -> dict[str, Any]: def as_json_dict(self) -> dict[str, Any]:
"""Return a json string representation of the AK object of this slot. """Return a json representation of the AK object of this slot.
:return: The json string representation is constructed :return: The json dict representation is constructed
following the input specification of the KoMa conference optimizer, cf. following the input specification of the KoMa conference optimizer, cf.
https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format https://github.com/Die-KoMa/ak-plan-optimierung/wiki/Input-&-output-format
:rtype: str :rtype: dict[str, Any]
""" """
# local import to prevent cyclic import # local import to prevent cyclic import
# pylint: disable=import-outside-toplevel # pylint: disable=import-outside-toplevel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment