Skip to content

Commit

Permalink
🎨 Format files with black 24
Browse files Browse the repository at this point in the history
  • Loading branch information
jh0ker committed Jul 17, 2024
1 parent ff7e4ac commit 152bcc2
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

from django.contrib import admin
from django.urls import include, path, re_path
from django.views.generic.base import RedirectView
Expand Down
1 change: 1 addition & 0 deletions bot_seo/pyadaptivecards_tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Extensions and hacks for pyadaptivecards. """

from typing import Literal, List, Optional

from pyadaptivecards.abstract_components import Serializable
Expand Down
1 change: 1 addition & 0 deletions okr/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for Django backend."""

# flake8: noqa

from django.contrib import admin
Expand Down
1 change: 1 addition & 0 deletions okr/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for Django model definitions."""

# flake8: noqa

from .base import *
Expand Down
6 changes: 3 additions & 3 deletions okr/patch_django_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def get_appmodel_context(self, appmodel, appmodel_abstracts):
]
context["m2m_targets"] = m2m_targets

context[
"docstring"
] = "Automatisch erzeugte Tabelle für eine Many-to-Many-Relation."
context["docstring"] = (
"Automatisch erzeugte Tabelle für eine Many-to-Many-Relation."
)

return context

Expand Down
1 change: 1 addition & 0 deletions okr/scrapers/common/google.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Set up Google service account credentials and required services.
Requires the ``GOOGLE_SERVICE_ACCOUNT`` environment variable to be set.
"""

import json
import os
import re
Expand Down
14 changes: 7 additions & 7 deletions okr/scrapers/podcasts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,13 +536,13 @@ def _scrape_spotify_api_episode_data(podcast, start_date, end_date):
episode_data[agg_type] = {"total": 0}

try:
episode_data[
"listeners_all_time"
] = spotify_api.podcast_episode_data_all_time(
podcast.spotify_id,
podcast_episode.spotify_id,
"listeners",
end=date,
episode_data["listeners_all_time"] = (
spotify_api.podcast_episode_data_all_time(
podcast.spotify_id,
podcast_episode.spotify_id,
"listeners",
end=date,
)
)
except SpotifyException:
episode_data["listeners_all_time"] = {"total": 0}
Expand Down
8 changes: 5 additions & 3 deletions okr/scrapers/youtube/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ def _scrape_youtube_traffic_source(
for source_type, (views, minutes_watched) in json_data.items():
defaults = {
"views": views,
"watch_time": to_timedelta(minutes_watched * 60)
if minutes_watched is not None
else None,
"watch_time": (
to_timedelta(minutes_watched * 60)
if minutes_watched is not None
else None
),
"quintly_last_updated": BERLIN.localize(
dt.datetime.fromisoformat(row.importTime)
),
Expand Down
1 change: 0 additions & 1 deletion worker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
""" Main entrypoint for the worker process """


import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
Expand Down

0 comments on commit 152bcc2

Please sign in to comment.