diff options
Diffstat (limited to 'pydis_site/utils/resources.py')
-rw-r--r-- | pydis_site/utils/resources.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pydis_site/utils/resources.py b/pydis_site/utils/resources.py index fb5faef8..637fd785 100644 --- a/pydis_site/utils/resources.py +++ b/pydis_site/utils/resources.py @@ -30,7 +30,8 @@ class Resource: return f"<Resource name={self.name}>" @classmethod - def construct_from_yaml(cls, yaml_data: typing.TextIO) -> Resource: # noqa + def construct_from_yaml(cls, yaml_data: typing.TextIO) -> Resource: + """Construct a Resource object from the provided YAML.""" resource = cls() loaded = yaml.safe_load(yaml_data) @@ -57,7 +58,8 @@ class Category: return f"<Category name={self.name}>" @classmethod - def construct_from_directory(cls, directory: str) -> Category: # noqa + def construct_from_directory(cls, directory: str) -> Category: + """Construct a Category object from the provided directory.""" category = cls() with open(f"{directory}/_category_info.yaml") as category_info: |