From b467d74ed86e109e7b4fac62634219b7b7955414 Mon Sep 17 00:00:00 2001 From: Joseph Banks Date: Sun, 7 Jul 2019 00:18:46 +0100 Subject: pin pycodestyle to 3.0.0 and fix linting errors --- pydis_site/utils/resources.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'pydis_site') diff --git a/pydis_site/utils/resources.py b/pydis_site/utils/resources.py index 875c0dc9..ab0df9d7 100644 --- a/pydis_site/utils/resources.py +++ b/pydis_site/utils/resources.py @@ -1,22 +1,22 @@ from __future__ import annotations -import yaml -import typing import glob +import typing from dataclasses import dataclass +import yaml + @dataclass class URL: + """A class representing a link to a resource""" icon: str title: str url: str class Resource: - """ - A class representing a resource on the resource page - """ + """A class representing a resource on the resource page""" description: str name: str payment: str @@ -24,6 +24,7 @@ class Resource: urls: typing.List[URL] def __repr__(self): + """Return a representation of the resource""" return f"" @classmethod @@ -43,14 +44,13 @@ class Resource: class Category: - """ - A class representing a resource on the resources page - """ + """A class representing a resource on the resources page""" resources: typing.List[Resource] name: str description: str def __repr__(self): + """Return a representation of the category""" return f"" @classmethod @@ -77,10 +77,7 @@ class Category: def load_categories(order: typing.List[str]) -> typing.List[Category]: - """ - Load the categories specified in the order list and return them - as a list. - """ + """Load the categories specified in the order list and return them""" categories = [] for cat in order: direc = "pydis_site/apps/home/resources/" + cat -- cgit v1.2.3