Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bradtgmurray committed Jan 30, 2024
1 parent 2c99335 commit 326c3a6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
1 change: 1 addition & 0 deletions linkedin_matrix/commands/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,5 @@ async def logout(evt: CommandEvent):
await evt.sender.logout()
await evt.reply("Successfully logged out")


# endregion
2 changes: 1 addition & 1 deletion linkedin_matrix/db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from mautrix.util.async_db import Database

from .http_header import HttpHeader
from .cookie import Cookie
from .http_header import HttpHeader
from .message import Message
from .model_base import Model
from .portal import Portal
Expand Down
6 changes: 3 additions & 3 deletions linkedin_matrix/user.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, AsyncGenerator, AsyncIterable, Awaitable, cast, Optional
from typing import TYPE_CHECKING, AsyncGenerator, AsyncIterable, Awaitable, Optional, cast
from asyncio.futures import Future
from datetime import datetime
import asyncio
Expand All @@ -26,7 +26,7 @@

from . import portal as po, puppet as pu
from .config import Config
from .db import HttpHeader, Cookie, User as DBUser
from .db import Cookie, HttpHeader, User as DBUser

if TYPE_CHECKING:
from .__main__ import LinkedInBridge
Expand Down Expand Up @@ -197,7 +197,7 @@ async def load_session(self, is_startup: bool = False) -> bool:

self.client = LinkedInMessaging.from_cookies_and_headers(
{c.name: c.value for c in cookies},
{h.name: h.value for h in await HttpHeader.get_for_mxid(self.mxid)}
{h.name: h.value for h in await HttpHeader.get_for_mxid(self.mxid)},
)

backoff = 1.0
Expand Down
14 changes: 5 additions & 9 deletions linkedin_messaging/linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,11 @@ class ChallengeException(Exception):
"sec-fetch-site": "same-origin",
"x-li-page-instance": "urn:li:page:feed_index_index;bcfe9fd6-239a-49e9-af15-44b7e5895eaa",
"x-li-recipe-accept": "application/vnd.linkedin.normalized+json+2.1",
"x-li-recipe-map": json.dumps(
{
"inAppAlertsTopic": "com.linkedin.voyager.dash.deco.identity.notifications.InAppAlert-51",
# noqa: E501
"professionalEventsTopic": "com.linkedin.voyager.dash.deco.events.ProfessionalEventDetailPage-53",
# noqa: E501
"topCardLiveVideoTopic": "com.linkedin.voyager.dash.deco.video.TopCardLiveVideo-9",
}
),
"x-li-recipe-map": json.dumps({
"inAppAlertsTopic": "com.linkedin.voyager.dash.deco.identity.notifications.InAppAlert-51",
"professionalEventsTopic": "com.linkedin.voyager.dash.deco.events.ProfessionalEventDetailPage-53", # noqa: E501
"topCardLiveVideoTopic": "com.linkedin.voyager.dash.deco.video.TopCardLiveVideo-9",
}),
}


Expand Down

0 comments on commit 326c3a6

Please sign in to comment.