diff options
author | 2019-09-24 17:32:03 -0400 | |
---|---|---|
committer | 2019-09-24 17:32:03 -0400 | |
commit | 37d989d0b74a1d0f8b0ee60749c79ea4a55ffba5 (patch) | |
tree | f1541776183c3d3850693ad20d81fb530bed3a1d /pydis_site/utils/resources.py | |
parent | Swap out old discord shield for new one. (diff) | |
parent | Merge branch 'master' into update-linting (diff) |
Merge pull request #251 from python-discord/update-linting
Update linting dependencies & relint
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: |