Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 121bce9

Browse files
committed
Re-enable some linting
1 parent 5172c8c commit 121bce9

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ line-length = 88
4848
# E731: do not assign a lambda expression, use a def
4949
# E501: Line too long (black enforces this for us)
5050
#
51-
# See https://github.com/charliermarsh/ruff/#pyflakes
51+
# See https://github.com/charliermarsh/ruff/#pyflakes-f
5252
# F401: unused import
5353
# F811: Redefinition of unused
5454
# F821: Undefined name
@@ -64,9 +64,6 @@ ignore = [
6464
"B024",
6565
"E501",
6666
"E731",
67-
"F401",
68-
"F811",
69-
"F821",
7067
]
7168
select = [
7269
# pycodestyle checks.

stubs/sortedcontainers/sortedlist.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ from __future__ import annotations
77
from typing import (
88
Any,
99
Callable,
10-
Generic,
1110
Iterable,
1211
Iterator,
1312
List,

stubs/sortedcontainers/sortedset.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
from __future__ import annotations
66

77
from typing import (
8-
AbstractSet,
98
Any,
109
Callable,
11-
Generic,
1210
Hashable,
1311
Iterable,
1412
Iterator,

stubs/synapse/synapse_rust/push.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Collection, Dict, Mapping, Optional, Sequence, Set, Tuple, Union
1+
from typing import Any, Collection, Dict, Mapping, Optional, Sequence, Tuple, Union
22

33
from synapse.types import JsonDict
44

synapse/config/_base.pyi

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import argparse
42
from typing import (
53
Any,
@@ -20,7 +18,7 @@ from typing import (
2018

2119
import jinja2
2220

23-
from synapse.config import (
21+
from synapse.config import ( # noqa: F401
2422
account_validity,
2523
api,
2624
appservice,
@@ -169,7 +167,7 @@ class RootConfig:
169167
self, section_name: Literal["caches"]
170168
) -> cache.CacheConfig: ...
171169
@overload
172-
def reload_config_section(self, section_name: str) -> Config: ...
170+
def reload_config_section(self, section_name: str) -> "Config": ...
173171

174172
class Config:
175173
root: RootConfig
@@ -202,9 +200,9 @@ def find_config_files(search_paths: List[str]) -> List[str]: ...
202200
class ShardedWorkerHandlingConfig:
203201
instances: List[str]
204202
def __init__(self, instances: List[str]) -> None: ...
205-
def should_handle(self, instance_name: str, key: str) -> bool: ...
203+
def should_handle(self, instance_name: str, key: str) -> bool: ... # noqa: F811
206204

207205
class RoutableShardedWorkerHandlingConfig(ShardedWorkerHandlingConfig):
208-
def get_instance(self, key: str) -> str: ...
206+
def get_instance(self, key: str) -> str: ... # noqa: F811
209207

210208
def read_file(file_path: Any, config_path: Iterable[str]) -> str: ...

tests/storage/test_event_push_actions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_count_aggregation(self) -> None:
154154
# Create a user to receive notifications and send receipts.
155155
user_id, token, _, other_token, room_id = self._create_users_and_room()
156156

157-
last_event_id: str
157+
last_event_id = ""
158158

159159
def _assert_counts(notif_count: int, highlight_count: int) -> None:
160160
counts = self.get_success(
@@ -289,7 +289,7 @@ def test_count_aggregation_threads(self) -> None:
289289
user_id, token, _, other_token, room_id = self._create_users_and_room()
290290
thread_id: str
291291

292-
last_event_id: str
292+
last_event_id = ""
293293

294294
def _assert_counts(
295295
notif_count: int,
@@ -471,7 +471,7 @@ def test_count_aggregation_mixed(self) -> None:
471471
user_id, token, _, other_token, room_id = self._create_users_and_room()
472472
thread_id: str
473473

474-
last_event_id: str
474+
last_event_id = ""
475475

476476
def _assert_counts(
477477
notif_count: int,

0 commit comments

Comments
 (0)