Skip to content

Commit

Permalink
Update session.py
Browse files Browse the repository at this point in the history
Signed-off-by: TheCommCraft <[email protected]>
  • Loading branch information
TheCommCraft authored Jan 1, 2025
1 parent bcae33b commit 3987c6f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scratchattach/site/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# import secrets
# import zipfile
from typing import Type
try:
from warnings import deprecated
except ImportError:
deprecated = lambda x: (lambda y: y)

from bs4 import BeautifulSoup

Expand Down Expand Up @@ -788,6 +792,7 @@ def connect_user(self, username: str) -> user.User:
"""
return self._make_linked_object("username", username, user.User, exceptions.UserNotFound)

@deprecated("Finding usernames by user ids has been fixed.")

This comment has been minimized.

Copy link
@TheCommCraft

TheCommCraft Jan 1, 2025

Author Collaborator

see #320

def find_username_from_id(self, user_id: int) -> str:
"""
Warning:
Expand All @@ -814,6 +819,7 @@ def find_username_from_id(self, user_id: int) -> str:
raise exceptions.UserNotFound()
return username

@deprecated("Finding usernames by user ids has been fixed.")
def connect_user_by_id(self, user_id: int) -> user.User:
"""
Gets a user using this session, connects the session to the User object to allow authenticated actions
Expand Down

0 comments on commit 3987c6f

Please sign in to comment.