Skip to content

Commit 2b28d7d

Browse files
committed
ruff format
1 parent f27804b commit 2b28d7d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

inertia/tests/test_encoder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ def test_it_handles_inertia_meta_fields(self):
4747
"created_at": "2022-10-31T10:13:01",
4848
}
4949
),
50-
self.encode(sport)
50+
self.encode(sport),
5151
)
5252

53-
5453
def test_it_handles_querysets(self):
5554
User(
5655
name="Brandon",

inertia/tests/testapp/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ class User(models.Model):
88
registered_at = models.DateTimeField()
99
created_at = models.DateField(auto_now_add=True)
1010

11+
1112
class Sport(models.Model):
1213
name = models.CharField(max_length=255)
1314
season = models.CharField(max_length=255)
1415
created_at = models.DateField(auto_now_add=True)
1516

1617
class InertiaMeta:
17-
fields = ('id', 'name', 'created_at')
18+
fields = ("id", "name", "created_at")

inertia/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def model_to_dict(model):
1414

1515
class InertiaJsonEncoder(DjangoJSONEncoder):
1616
def default(self, value):
17-
if hasattr(value.__class__, 'InertiaMeta'):
17+
if hasattr(value.__class__, "InertiaMeta"):
1818
return {
1919
field: getattr(value, field)
2020
for field in value.__class__.InertiaMeta.fields

0 commit comments

Comments
 (0)