Skip to content

Commit

Permalink
MAINT: more f-strings, less format()
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolodi committed Sep 2, 2023
1 parent 5d6f2ef commit c9ae586
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions mesonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,8 @@ def normalized_name(self) -> str:

@property
def basename(self) -> str:
"""Normalized wheel name and version (eg. meson_python-1.0.0)."""
return '{distribution}-{version}'.format(
distribution=self.normalized_name,
version=self._project.version,
)
"""Normalized wheel name and version."""
return f'{self.normalized_name}-{self._project.version}'

@property
def tag(self) -> mesonpy._tags.Tag:
Expand All @@ -306,10 +303,7 @@ def tag(self) -> mesonpy._tags.Tag:
@property
def name(self) -> str:
"""Wheel name, this includes the basename and tag."""
return '{basename}-{tag}'.format(
basename=self.basename,
tag=self.tag,
)
return f'{self.basename}-{self.tag}'

@property
def distinfo_dir(self) -> str:
Expand Down

0 comments on commit c9ae586

Please sign in to comment.