Skip to content

Commit 5bf441c

Browse files
committed
fix format
1 parent f8e1aa7 commit 5bf441c

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

intbot/core/integrations/pretalx.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ def get_event_url(event):
3131
return f"https://pretalx.com/api/events/{event}/"
3232

3333

34-
def fetch_pretalx_data(event: str, resource: PretalxData.PretalxResources) -> list[JsonType]:
34+
def fetch_pretalx_data(
35+
event: str, resource: PretalxData.PretalxResources
36+
) -> list[JsonType]:
3537
headers = {
3638
"Authorization": f"Token {settings.PRETALX_API_TOKEN}",
3739
"Content-Type": "application/json",

intbot/core/migrations/0005_add_pretalx_data_model.py

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,39 @@
55

66

77
class Migration(migrations.Migration):
8-
98
dependencies = [
10-
('core', '0004_add_inbox_item_model'),
9+
("core", "0004_add_inbox_item_model"),
1110
]
1211

1312
operations = [
1413
migrations.CreateModel(
15-
name='PretalxData',
14+
name="PretalxData",
1615
fields=[
17-
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
18-
('uuid', models.UUIDField(default=uuid.uuid4)),
19-
('resource', models.CharField(choices=[('submissions', 'Submissions'), ('speakers', 'Speakers'), ('schedule', 'Schedule')], max_length=255)),
20-
('content', models.JSONField()),
21-
('created_at', models.DateTimeField(auto_now_add=True)),
22-
('modified_at', models.DateTimeField(auto_now=True)),
23-
('processed_at', models.DateTimeField(blank=True, null=True)),
16+
(
17+
"id",
18+
models.BigAutoField(
19+
auto_created=True,
20+
primary_key=True,
21+
serialize=False,
22+
verbose_name="ID",
23+
),
24+
),
25+
("uuid", models.UUIDField(default=uuid.uuid4)),
26+
(
27+
"resource",
28+
models.CharField(
29+
choices=[
30+
("submissions", "Submissions"),
31+
("speakers", "Speakers"),
32+
("schedule", "Schedule"),
33+
],
34+
max_length=255,
35+
),
36+
),
37+
("content", models.JSONField()),
38+
("created_at", models.DateTimeField(auto_now_add=True)),
39+
("modified_at", models.DateTimeField(auto_now=True)),
40+
("processed_at", models.DateTimeField(blank=True, null=True)),
2441
],
2542
),
2643
]

intbot/core/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class PretalxResources(models.TextChoices):
9898
schedule = "schedule", "Schedule"
9999

100100
uuid = models.UUIDField(default=uuid.uuid4)
101-
resource= models.CharField(
101+
resource = models.CharField(
102102
max_length=255,
103103
choices=PretalxResources.choices,
104104
)

intbot/tests/test_integrations/test_pretalx.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def submissions_pages_generator(url):
3333
},
3434
)
3535

36+
3637
def speaker_pages_generator(url):
3738
"""
3839
Generator to simulate pagination.

0 commit comments

Comments
 (0)