aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-09-06 16:38:46 -0400
committerGravatar GitHub <[email protected]>2019-09-06 16:38:46 -0400
commit2ac3626d25ad1a02b7d4c09c6ee4fdcdcc1f6079 (patch)
tree616f6e5da922a45465b5fba4f5e3945861e61f29 /pydis_site/apps
parentMerge pull request #238 from python-discord/django-deleted-messages-frontend (diff)
parentFix misconfigured flake8 so docstrings are properly linted (diff)
Merge pull request #241 from python-discord/fix-flake8-docstrings
Fix misconfigured flake8 so docstrings are properly linted
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/api/serializers.py3
-rw-r--r--pydis_site/apps/home/tests/test_repodata_helpers.py4
-rw-r--r--pydis_site/apps/home/views/home.py2
3 files changed, 5 insertions, 4 deletions
diff --git a/pydis_site/apps/api/serializers.py b/pydis_site/apps/api/serializers.py
index 40ca755d..442f6209 100644
--- a/pydis_site/apps/api/serializers.py
+++ b/pydis_site/apps/api/serializers.py
@@ -122,7 +122,8 @@ class InfractionSerializer(ModelSerializer):
class ExpandedInfractionSerializer(InfractionSerializer):
- """A class providing expanded (de-)serialization of `Infraction` instances.
+ """
+ A class providing expanded (de-)serialization of `Infraction` instances.
In addition to the fields of `Infraction` objects themselves, this
serializer also attaches the `user` and `actor` fields when serializing.
diff --git a/pydis_site/apps/home/tests/test_repodata_helpers.py b/pydis_site/apps/home/tests/test_repodata_helpers.py
index df1ffd73..61b8e034 100644
--- a/pydis_site/apps/home/tests/test_repodata_helpers.py
+++ b/pydis_site/apps/home/tests/test_repodata_helpers.py
@@ -11,7 +11,7 @@ from pydis_site.apps.home.views import HomeView
def mocked_requests_get(*args, **kwargs) -> "MockResponse": # noqa
- """A mock version of requests.get, so we don't need to call the API every time we run a test"""
+ """A mock version of requests.get, so we don't need to call the API every time we run a test."""
class MockResponse:
def __init__(self, json_data, status_code):
self.json_data = json_data
@@ -61,7 +61,7 @@ class TestRepositoryMetadataHelpers(TestCase):
@mock.patch('requests.get', side_effect=mocked_requests_get)
def test_refresh_stale_metadata(self, _: mock.MagicMock):
- """Test if the _get_repo_data helper will refresh when the data is stale"""
+ """Test if the _get_repo_data helper will refresh when the data is stale."""
repo_data = RepositoryMetadata(
repo_name="python-discord/site",
description="testrepo",
diff --git a/pydis_site/apps/home/views/home.py b/pydis_site/apps/home/views/home.py
index 03873a72..63f25c15 100644
--- a/pydis_site/apps/home/views/home.py
+++ b/pydis_site/apps/home/views/home.py
@@ -106,6 +106,6 @@ class HomeView(View):
return database_repositories
def get(self, request: WSGIRequest) -> HttpResponse:
- """Collect repo data and render the homepage view"""
+ """Collect repo data and render the homepage view."""
repo_data = self._get_repo_data()
return render(request, "home/index.html", {"repo_data": repo_data})