Skip to content

Commit 9285434

Browse files
committed
Update ruff and fix pyright mode
1 parent 1f1dc37 commit 9285434

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.3.2
9+
rev: v0.12.3
1010
hooks:
1111
- name: ruff-fix
1212
id: ruff

bot/src/ghutils/core/cog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init_subclass__(cls, setup: bool = True, **kwargs: Any) -> None:
3939
else:
4040
logger.debug(
4141
f"Not adding setup function for {cls} to {cls.__module__},"
42-
+ f" attribute already exists: {getattr(module, "setup", None)}"
42+
+ f" attribute already exists: {getattr(module, 'setup', None)}"
4343
)
4444

4545
@classmethod

bot/src/ghutils/utils/discord/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def print_command(
2929
) -> str:
3030
limit = 100 if truncate else None
3131
args = " ".join(
32-
f"{name}: {truncate_str(str(value), limit, message=" ... (truncated)")}"
32+
f"{name}: {truncate_str(str(value), limit, message=' ... (truncated)')}"
3333
for name, value in interaction.namespace
3434
)
3535
return f"/{command.qualified_name} {args}"

bot/src/ghutils/utils/github.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def of(cls, pr: Issue | PullRequest) -> PullRequestState | None:
5353
return None
5454

5555
case (
56-
Issue(state="open", draft=True)
57-
| PullRequest(state="open", draft=True)
56+
Issue(state="open", draft=True) | PullRequest(state="open", draft=True)
5857
):
5958
return PullRequestState.DRAFT
6059

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ managed = true
2020
virtual = true
2121
universal = true
2222
dev-dependencies = [
23-
"ruff~=0.4.10",
23+
"ruff~=0.12.3",
2424
"pre-commit",
2525
]
2626

@@ -95,7 +95,7 @@ exclude = [
9595
"**/__pycache__",
9696
]
9797

98-
typeCheckingMode = "basic"
98+
typeCheckingMode = "standard"
9999

100100
enableExperimentalFeatures = true
101101
strictDictionaryInference = true

requirements-dev.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ numpy==1.26.4
148148
# via pylette
149149
# via scikit-learn
150150
# via scipy
151-
object-ci @ git+https://github.com/object-Object/ci@6c2cba42668b4c632a1368adb5034e733cb6cc0a
151+
object-ci @ git+https://github.com/object-Object/ci@ff3bc4f4204b3ba7153c247c1a73af649e5d27ad
152152
# via ghutils-infrastructure
153153
orjson==3.10.5
154154
# via fastapi
@@ -205,7 +205,7 @@ requests==2.32.3
205205
# via pylette
206206
rich==13.7.1
207207
# via typer
208-
ruff==0.4.10
208+
ruff==0.12.3
209209
scikit-learn==1.6.1
210210
# via pylette
211211
scipy==1.15.1

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ numpy==1.26.4
138138
# via pylette
139139
# via scikit-learn
140140
# via scipy
141-
object-ci @ git+https://github.com/object-Object/ci@6c2cba42668b4c632a1368adb5034e733cb6cc0a
141+
object-ci @ git+https://github.com/object-Object/ci@ff3bc4f4204b3ba7153c247c1a73af649e5d27ad
142142
# via ghutils-infrastructure
143143
orjson==3.10.5
144144
# via fastapi

0 commit comments

Comments
 (0)