Skip to content

Commit a73ef46

Browse files
committed
project: fix black + python
1 parent 85aa0e8 commit a73ef46

10 files changed

Lines changed: 17 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
max-parallel: 5
1010
matrix:
11-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
11+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1212

1313
steps:
1414
- uses: actions/checkout@v1
@@ -21,4 +21,4 @@ jobs:
2121
python -m pip install --upgrade pip
2222
pip install -r requirements/project.txt
2323
- name: Test with hatch
24-
run: hatch run all
24+
run: hatch run all

py3status/modules/dnf_updates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _get_dnf_data(self):
8585
return (temporary, cached_until)
8686

8787
def dnf_updates(self):
88-
(dnf_data, cached_until) = self._get_dnf_data()
88+
dnf_data, cached_until = self._get_dnf_data()
8989

9090
for x in self.thresholds_init:
9191
self.py3.threshold_get_color(dnf_data[x], x)

py3status/modules/glpi.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ def glpi(self):
5959
connect_timeout=self.timeout,
6060
)
6161
mycr = mydb.cursor()
62-
mycr.execute(
63-
"""select count(*)
62+
mycr.execute("""select count(*)
6463
from glpi_tickets
65-
where closedate is NULL and solvedate is NULL;"""
66-
)
64+
where closedate is NULL and solvedate is NULL;""")
6765
row = mycr.fetchone()
6866
if row:
6967
open_tickets = int(row[0])

py3status/modules/kdeconnector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def kdeconnector(self):
546546
raise KeyboardInterrupt
547547

548548
if self._bus_initialized:
549-
(text, color) = self._get_text()
549+
text, color = self._get_text()
550550
cached_until = self.py3.CACHE_FOREVER
551551

552552
else:

py3status/modules/mpd_status.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ def mpd_status(self):
178178
self._get_status()
179179

180180
# II - format response
181-
(text, state) = ("", "")
181+
text, state = ("", "")
182182
if self.current_status is not None:
183-
(text, state) = self.current_status
183+
text, state = self.current_status
184184

185185
if len(text) > self.max_width:
186186
text = "{}...".format(text[: self.max_width - 3])

py3status/modules/rt.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,15 @@ def rt(self):
6666
connect_timeout=self.timeout,
6767
)
6868
mycr = mydb.cursor()
69-
mycr.execute(
70-
"""select q.Name as queue, coalesce(total,0) as total
69+
mycr.execute("""select q.Name as queue, coalesce(total,0) as total
7170
from Queues as q
7271
left join (
7372
select t.Queue as queue, count(t.id) as total
7473
from Tickets as t
7574
where Status = 'new' or Status = 'open' or Status = 'stalled'
7675
group by t.Queue)
7776
as s on s.Queue = q.id
78-
group by q.Name;"""
79-
)
77+
group by q.Name;""")
8078
for row in mycr.fetchall():
8179
queue, nb_tickets = row
8280
if queue == "___Approvals":

py3status/modules/spotify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def spotify(self):
145145
"""
146146
Get the current "artist - title" and return it.
147147
"""
148-
(text, color) = self._get_text()
148+
text, color = self._get_text()
149149
response = {
150150
"cached_until": self.py3.time_in(self.cache_timeout),
151151
"color": color,

py3status/modules/sysdata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ def _calc_mem_info(self, unit, meminfo, memory):
389389
free_percent = 100 - used_percent
390390

391391
unit = "B" if unit == "dynamic" else unit
392-
(total, total_unit) = self.py3.format_units(total_mem_kib * 1024, unit)
393-
(used, used_unit) = self.py3.format_units(used_mem_kib * 1024, unit)
394-
(free, free_unit) = self.py3.format_units(free_mem_kib * 1024, unit)
392+
total, total_unit = self.py3.format_units(total_mem_kib * 1024, unit)
393+
used, used_unit = self.py3.format_units(used_mem_kib * 1024, unit)
394+
free, free_unit = self.py3.format_units(free_mem_kib * 1024, unit)
395395
return (
396396
total,
397397
total_unit,

py3status/modules/weather_owm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def _jpath(self, data, query, default=None):
509509
# This represents a key:index expression, representing first
510510
# selecting a key, then an index
511511
if ":" in part:
512-
(part, index) = tuple(part.split(":"))
512+
part, index = tuple(part.split(":"))
513513
data = data[part]
514514
data = data[int(index)]
515515

@@ -839,7 +839,7 @@ def weather_owm(self):
839839
loc_tz_info = self._get_loc_tz_info()
840840
text = ""
841841
if loc_tz_info is not None:
842-
(coords, city, country) = loc_tz_info
842+
coords, city, country = loc_tz_info
843843
if coords:
844844
current_api_params = {"lat": coords[0], "lon": coords[1]}
845845
elif city:

py3status/parse_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ def process_value(self, name, value, module_name):
565565
if type(value).__name__ not in ["str", "unicode"]:
566566
self.error("Only strings can be obfuscated")
567567

568-
(name, scheme) = name.split(":")
568+
name, scheme = name.split(":")
569569
if scheme == "base64":
570570
value = PrivateBase64(value, module_name)
571571
elif scheme == "hide":

0 commit comments

Comments
 (0)