Skip to content

Commit

Permalink
fix new ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Aug 23, 2024
1 parent 83c9cf8 commit b105456
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions scal3/plugin_man.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def load(self):
y = int(date[0])
m = int(date[1])
d = int(date[2])
yearlyData[12][(y, m, d)] = text
yearlyData[12][y, m, d] = text
elif len(date) == 2:
m = int(date[0])
d = int(date[1])
Expand Down Expand Up @@ -600,7 +600,7 @@ def load(self):
text += "\n" + DESCRIPTION
for jd in getJdListFromEpochRange(DTSTART, DTEND):
y, m, d = gregorian.jd_to(jd)
md[(m, d)] = text
md[m, d] = text
else:
log.error(
f"unsupported ics event, {SUMMARY=}, "
Expand Down Expand Up @@ -659,7 +659,7 @@ def load(self):
text += "\n" + DESCRIPTION
for jd in getJdListFromEpochRange(DTSTART, DTEND):
y, m, d = gregorian.jd_to(jd)
ymd[(y, m, d)] = text
ymd[y, m, d] = text
SUMMARY = ""
DESCRIPTION = ""
DTSTART = None
Expand Down Expand Up @@ -709,9 +709,9 @@ def getText(self, y, m, d):
+ " "
+ _(y)
+ ": "
+ self.ymd[(y, m, d)]
+ self.ymd[y, m, d]
)
return self.ymd[(y, m, d)]
return self.ymd[y, m, d]
if self.md and (m, d) in self.md:
if self.show_date:
return (
Expand All @@ -721,9 +721,9 @@ def getText(self, y, m, d):
+ " "
+ _(y)
+ ": "
+ self.ymd[(y, m, d)]
+ self.ymd[y, m, d]
)
return self.md[(m, d)]
return self.md[m, d]
return ""

def open_configure(self):
Expand Down
2 changes: 1 addition & 1 deletion scal3/time_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def simpleTimeEncode(
def timeDecode(st: str) -> tuple[int, int, int]:
parts = st.split(":")
try:
tm = tuple([int(p) for p in parts])
tm = tuple(int(p) for p in parts)
except ValueError:
raise ValueError(f"bad time '{st}'") from None
if len(tm) == 1:
Expand Down
2 changes: 1 addition & 1 deletion scal3/ui_gtk/event/rule/weekDay.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setStart(self, s):

def updateVars(self):
cbl = self.cbList
self.rule.weekDayList = tuple([j for j in range(7) if cbl[j].get_active()])
self.rule.weekDayList = tuple(j for j in range(7) if cbl[j].get_active())

def updateWidget(self):
cbl = self.cbList
Expand Down

0 comments on commit b105456

Please sign in to comment.