Skip to content

Commit 6e798cf

Browse files
committed
misc
1 parent f3fc46e commit 6e798cf

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

config/settings/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
import socket
7777

7878
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
79-
INTERNAL_IPS += [".".join(ip.split(".")[:-1] + ["1"]) for ip in ips]
79+
INTERNAL_IPS += [".".join([*ip.split(".")[:-1], "1"]) for ip in ips]
8080
with contextlib.suppress(socket.gaierror):
8181
_, _, ips = socket.gethostbyname_ex("node") # type: ignore[assignment]
8282
INTERNAL_IPS.extend(ips)

democrasite/webiscite/constitution.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"""This module handles the logic behind the constitution.
22
3-
This contains methods to read the constitution as a dict, check which files in
4-
a diff contain constitutional amendments, and automatically update the
5-
constitution for changes which edit files included in the constitution without
6-
resulting in constitutional amendments
3+
This contains functions to read the constitution as json, check which files in a diff
4+
contain constitutional amendments, and automatically update the constitution for changes
5+
that moved constitutionally protected sections without editing them
76
"""
87

98
import json

democrasite/webiscite/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __str__(self) -> str:
8686
return f"PR #{self.number}"
8787

8888
def log(self, msg, *args, level=logging.INFO):
89-
logger.info(level, f"PR #%s: {msg}", self.number, *args)
89+
logger.log(level, f"PR #%s: {msg}", self.number, *args) # noqa: G004
9090
# f-string necessary to let string interpolation work in msg
9191

9292
@property
@@ -369,7 +369,7 @@ def vote(self, user: User, *, support: bool) -> None:
369369
vote: Vote = self.vote_set.get(user=user)
370370
if vote.support == support:
371371
vote.delete()
372-
self.info("%s retracted their %s vote", user.username, supports)
372+
self.log("%s retracted their %s vote", user.username, supports)
373373

374374
else:
375375
vote.support = support

0 commit comments

Comments
 (0)