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

Commit

Permalink
Re-enable some linting
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jan 11, 2023
1 parent 5172c8c commit 19a02ab
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ line-length = 88
# E731: do not assign a lambda expression, use a def
# E501: Line too long (black enforces this for us)
#
# See https://github.com/charliermarsh/ruff/#pyflakes
# See https://github.com/charliermarsh/ruff/#pyflakes-f
# F401: unused import
# F811: Redefinition of unused
# F821: Undefined name
Expand All @@ -64,9 +64,6 @@ ignore = [
"B024",
"E501",
"E731",
"F401",
"F811",
"F821",
]
select = [
# pycodestyle checks.
Expand All @@ -80,6 +77,10 @@ select = [
"C4",
]

[tool.ruff.per-file-ignores]
# Ruff is *very* confused about this .pyi file, so let's just ignore it for now.
"synapse/config/_base.pyi" = ["F401", "F811"]

[tool.isort]
line_length = 88
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "TWISTED", "FIRSTPARTY", "TESTS", "LOCALFOLDER"]
Expand Down
1 change: 0 additions & 1 deletion stubs/sortedcontainers/sortedlist.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ from __future__ import annotations
from typing import (
Any,
Callable,
Generic,
Iterable,
Iterator,
List,
Expand Down
2 changes: 0 additions & 2 deletions stubs/sortedcontainers/sortedset.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
from __future__ import annotations

from typing import (
AbstractSet,
Any,
Callable,
Generic,
Hashable,
Iterable,
Iterator,
Expand Down
2 changes: 1 addition & 1 deletion stubs/synapse/synapse_rust/push.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Collection, Dict, Mapping, Optional, Sequence, Set, Tuple, Union
from typing import Any, Collection, Dict, Mapping, Optional, Sequence, Tuple, Union

from synapse.types import JsonDict

Expand Down
6 changes: 3 additions & 3 deletions tests/storage/test_event_push_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_count_aggregation(self) -> None:
# Create a user to receive notifications and send receipts.
user_id, token, _, other_token, room_id = self._create_users_and_room()

last_event_id: str
last_event_id = ""

def _assert_counts(notif_count: int, highlight_count: int) -> None:
counts = self.get_success(
Expand Down Expand Up @@ -289,7 +289,7 @@ def test_count_aggregation_threads(self) -> None:
user_id, token, _, other_token, room_id = self._create_users_and_room()
thread_id: str

last_event_id: str
last_event_id = ""

def _assert_counts(
notif_count: int,
Expand Down Expand Up @@ -471,7 +471,7 @@ def test_count_aggregation_mixed(self) -> None:
user_id, token, _, other_token, room_id = self._create_users_and_room()
thread_id: str

last_event_id: str
last_event_id = ""

def _assert_counts(
notif_count: int,
Expand Down

0 comments on commit 19a02ab

Please sign in to comment.