Skip to content

Commit aa3418b

Browse files
committed
Use TraceLogger in type hints and fix some other things
1 parent 7f353ab commit aa3418b

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

mautrix/bridge/bridge.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
from typing import Optional, Type
7-
from itertools import chain
87
import sys
98

109
import sqlalchemy as sql

mautrix/bridge/portal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010

1111
from mautrix.appservice import AppService, IntentAPI
1212
from mautrix.types import RoomID, EventID, MessageEventContent
13+
from mautrix.util.logging import TraceLogger
1314

1415
if TYPE_CHECKING:
1516
from .user import BaseUser
1617

1718

1819
class BasePortal(ABC):
19-
log: logging.Logger = logging.getLogger("mau.portal")
20+
log: TraceLogger = logging.getLogger("mau.portal")
2021
az: AppService
2122
loop: asyncio.AbstractEventLoop
2223
main_intent: IntentAPI

mautrix/bridge/puppet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from mautrix.types import UserID
1212
from mautrix.appservice import AppService, IntentAPI
13+
from mautrix.util.logging import TraceLogger
1314

1415
from .custom_puppet import CustomPuppetMixin
1516

@@ -18,7 +19,7 @@
1819

1920

2021
class BasePuppet(CustomPuppetMixin, ABC):
21-
log: logging.Logger = logging.getLogger("mau.puppet")
22+
log: TraceLogger = logging.getLogger("mau.puppet")
2223
az: AppService
2324
loop: asyncio.AbstractEventLoop
2425
mx: 'BaseMatrixHandler'

mautrix/bridge/user.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010

1111
from mautrix.appservice import AppService
1212
from mautrix.types import UserID
13+
from mautrix.util.logging import TraceLogger
1314

1415

1516
class BaseUser(ABC):
16-
log: logging.Logger = logging.getLogger("mau.user")
17+
log: TraceLogger = logging.getLogger("mau.user")
1718
az: AppService
1819
loop: asyncio.AbstractEventLoop
1920

mautrix/client/api/types/event/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class RoomTopicStateEventContent(SerializableAttrs['RoomTopicStateEventContent']
104104

105105
@dataclass
106106
class RoomAvatarStateEventContent(SerializableAttrs['RoomAvatarStateEventContent']):
107-
url: ContentURI = None
107+
url: Optional[ContentURI] = None
108108

109109

110110
@dataclass

0 commit comments

Comments
 (0)