Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 25, 2023
1 parent c26caee commit 1814d28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
4 changes: 1 addition & 3 deletions khal/khalendar/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,7 @@ def summary(self) -> str:
suffix = 'rd'
else:
suffix = 'th'
return '{name}\'s {number}{suffix} {desc}{leap}'.format(
name=name, number=number, suffix=suffix, desc=description, leap=leap,
)
return f'{name}\'s {number}{suffix} {description}{leap}'
else:
return self._vevents[self.ref].get('SUMMARY', '')

Expand Down
8 changes: 2 additions & 6 deletions khal/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ def relative_day(self, day: dt.date, dtformat: str) -> str:

approx_delta = utils.relative_timedelta_str(day)

return '{weekday}, {day} ({approx_delta})'.format(
weekday=weekday,
approx_delta=approx_delta,
day=daystr,
)
return f'{weekday}, {daystr} ({approx_delta})'

def keypress(self, _, key: str) -> str:
binds = self._conf['keybindings']
Expand Down Expand Up @@ -245,7 +241,7 @@ def __init__(
set_focus_date_callback=None,
**kwargs):
self._init: bool = True
self.parent: 'ClassicView' = parent
self.parent: ClassicView = parent
self.delete_status = delete_status
self.toggle_delete_instance = toggle_delete_instance
self.toggle_delete_all = toggle_delete_all
Expand Down
2 changes: 1 addition & 1 deletion khal/ui/calendarwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def __init__(self, walker: 'CalendarWalker'):
self.on_press = walker.on_press
self._marked: Optional[MarkType] = None
self._pos_old: Optional[Tuple[int, int]] = None
self.body: 'CalendarWalker'
self.body: CalendarWalker
super().__init__(walker)

@property
Expand Down
7 changes: 1 addition & 6 deletions khal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,7 @@ def relative_timedelta_str(day: dt.date) -> str:
if count > 1:
unit += 's'

return '{approx}{count} {unit} {direction}'.format(
approx=approx,
count=count,
unit=unit,
direction=direction,
)
return f'{approx}{count} {unit} {direction}'


def get_wrapped_text(widget):
Expand Down

0 comments on commit 1814d28

Please sign in to comment.