Skip to content

Commit fef078e

Browse files
Merge main into msl-auth
2 parents 5f60e4c + 3dce0f6 commit fef078e

File tree

8 files changed

+149
-153
lines changed

8 files changed

+149
-153
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ default_stages: [pre-commit, pre-merge-commit, manual]
55

66
repos:
77
- repo: https://github.com/astral-sh/uv-pre-commit
8-
rev: 0.9.28
8+
rev: 0.10.3
99
hooks:
1010
- id: uv-lock
1111
always_run: true
@@ -21,7 +21,7 @@ repos:
2121
- id: codespell
2222

2323
- repo: https://github.com/tombi-toml/tombi-pre-commit
24-
rev: v0.7.25
24+
rev: v0.7.29
2525
hooks:
2626
- id: tombi-format
2727
- id: tombi-lint
@@ -32,7 +32,7 @@ repos:
3232
- id: sync-with-uv
3333

3434
- repo: https://github.com/rhysd/actionlint
35-
rev: v1.7.10
35+
rev: v1.7.11
3636
hooks:
3737
- id: actionlint
3838
additional_dependencies: [github.com/wasilibs/go-shellcheck/cmd/shellcheck@latest] # yamllint disable-line rule:key-ordering
@@ -56,14 +56,14 @@ repos:
5656
args: [--strict]
5757

5858
- repo: https://github.com/renovatebot/pre-commit-hooks
59-
rev: 43.0.6
59+
rev: 43.17.1
6060
hooks:
6161
- id: renovate-config-validator
6262
args: [--strict]
6363
stages: [manual]
6464

6565
- repo: https://github.com/python-jsonschema/check-jsonschema
66-
rev: 0.36.1
66+
rev: 0.36.2
6767
hooks:
6868
- id: check-jsonschema
6969
args: [--schemafile, 'https://json.schemastore.org/yamllint.json'] # yamllint disable-line rule:quoted-strings
@@ -116,7 +116,7 @@ repos:
116116
args: [--autofix]
117117

118118
- repo: https://github.com/astral-sh/ruff-pre-commit
119-
rev: v0.14.14
119+
rev: v0.15.1
120120
hooks:
121121
- id: ruff-check
122122
args: [--fix]

cogs/committee_actions_tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ async def create(
238238
In normal use the autocomplete should be used, but a discord ID can be
239239
used directly if the user wishes to action a user not included in the autocomplete.
240240
"""
241-
member_id: str = action_member_id if action_member_id else str(ctx.user.id)
241+
member_id: str = action_member_id or str(ctx.user.id)
242242

243243
try:
244244
action_user: discord.Member = await self.bot.get_member_from_str_id(member_id)

config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,7 @@ def _setup_statistics_roles(cls) -> None:
880880
if raw_statistics_role.strip()
881881
}
882882

883-
cls._settings["STATISTICS_ROLES"] = (
884-
statistics_roles if statistics_roles else DEFAULT_STATISTICS_ROLES
885-
)
883+
cls._settings["STATISTICS_ROLES"] = statistics_roles or DEFAULT_STATISTICS_ROLES
886884

887885
@classmethod
888886
def _setup_membership_dependent_roles(cls) -> None:

exceptions/config_changes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ def __init__(
3535
self, message: str | None = None, changed_settings: "AbstractSet[str] | None" = None
3636
) -> None:
3737
"""Initialise an Exception to apply configuration changes."""
38-
self.changed_settings: AbstractSet[str] | None = (
39-
changed_settings if changed_settings else set()
40-
)
38+
self.changed_settings: AbstractSet[str] | None = changed_settings or set()
4139

4240
super().__init__(message)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ select = ["ALL", "D204", "D213", "D401"]
184184
task-tags = ["BUG", "DONE", "FIXME", "HACK", "IDEA", "ISSUE", "NOBUG", "NOTE", "REQ", "TODO"]
185185

186186
[tool.ruff.lint.flake8-import-conventions]
187-
aliases = { }
187+
aliases = {}
188188
banned-aliases = { "regex" = ["re"], "numpy" = ["np"], "matplotlib" = ["mpl"], "matplotlib.pyplot" = [
189189
"plt"
190190
] }

utils/tex_bot.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -290,32 +290,27 @@ def group_full_name(self) -> str:
290290
The group-full-name is either retrieved from the provided environment variable
291291
or automatically identified from the name of your group's Discord guild.
292292
"""
293-
return (
294-
settings["_GROUP_FULL_NAME"]
295-
if settings["_GROUP_FULL_NAME"]
296-
else (
297-
"The Computer Science Society"
298-
if (
299-
"computer science society" in self.main_guild.name.lower()
300-
or "css" in self.main_guild.name.lower()
301-
)
302-
else self.main_guild.name
293+
return settings["_GROUP_FULL_NAME"] or (
294+
"The Computer Science Society"
295+
if (
296+
"computer science society" in self.main_guild.name.lower()
297+
or "css" in self.main_guild.name.lower()
303298
)
299+
else self.main_guild.name
304300
)
305301

306302
@property
307303
def group_short_name(self) -> str:
308304
"""
309305
The short colloquial name of your community group.
310306
311-
This defaults to `TeXBot.group_full_name`,
307+
This defaults to `TeXBot.group_full_name`
312308
if no group-short-name is provided/could not be determined.
313309
"""
314310
return (
315311
(
316312
settings["_GROUP_SHORT_NAME"]
317-
if settings["_GROUP_SHORT_NAME"]
318-
else (
313+
or (
319314
"CSS"
320315
if (
321316
"computer science society" in self.group_full_name.lower()

utils/tex_bot_base_cog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async def send_error(
149149
" ".join(
150150
message_part
151151
for message_part in (
152-
error_code if error_code else "",
152+
error_code or "",
153153
f"({interaction_name})",
154154
str(logging_message),
155155
)

0 commit comments

Comments
 (0)