aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/utils/resources.py
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-09-24 17:32:03 -0400
committerGravatar GitHub <[email protected]>2019-09-24 17:32:03 -0400
commit37d989d0b74a1d0f8b0ee60749c79ea4a55ffba5 (patch)
treef1541776183c3d3850693ad20d81fb530bed3a1d /pydis_site/utils/resources.py
parentSwap out old discord shield for new one. (diff)
parentMerge 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.py6
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: