Skip to content

Commit 046bdc4

Browse files
committed
Replace format()s with f-strings to fix UP032 errors
1 parent 2e97bc1 commit 046bdc4

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

tests/factories.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Meta:
1515
model = Module
1616

1717
project_version = factory.SubFactory(ProjectVersionFactory)
18-
name = factory.Sequence("module{}".format)
18+
name = factory.Sequence(lambda n: f"module{n}")
1919

2020

2121
class KlassFactory(factory.django.DjangoModelFactory):
@@ -25,11 +25,7 @@ class Meta:
2525
module = factory.SubFactory(ModuleFactory)
2626
name = factory.Sequence("klass{}".format)
2727
line_number = 1
28-
import_path = factory.LazyAttribute(
29-
lambda a: "Django.{module}".format(
30-
module=a.module.name,
31-
)
32-
)
28+
import_path = factory.LazyAttribute(lambda a: f"Django.{a.module.name}")
3329

3430

3531
class InheritanceFactory(factory.django.DjangoModelFactory):

0 commit comments

Comments
 (0)