Skip to content

Commit c9ae586

Browse files
committed
MAINT: more f-strings, less format()
1 parent 5d6f2ef commit c9ae586

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

mesonpy/__init__.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,8 @@ def normalized_name(self) -> str:
284284

285285
@property
286286
def basename(self) -> str:
287-
"""Normalized wheel name and version (eg. meson_python-1.0.0)."""
288-
return '{distribution}-{version}'.format(
289-
distribution=self.normalized_name,
290-
version=self._project.version,
291-
)
287+
"""Normalized wheel name and version."""
288+
return f'{self.normalized_name}-{self._project.version}'
292289

293290
@property
294291
def tag(self) -> mesonpy._tags.Tag:
@@ -306,10 +303,7 @@ def tag(self) -> mesonpy._tags.Tag:
306303
@property
307304
def name(self) -> str:
308305
"""Wheel name, this includes the basename and tag."""
309-
return '{basename}-{tag}'.format(
310-
basename=self.basename,
311-
tag=self.tag,
312-
)
306+
return f'{self.basename}-{self.tag}'
313307

314308
@property
315309
def distinfo_dir(self) -> str:

0 commit comments

Comments
 (0)