MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / _make_linked_object

Method _make_linked_object

scratchattach/site/session.py:1077–1090  ·  view source on GitHub ↗

The Session class doesn't save the login in a ._session attribute, but IS the login ITSELF. Therefore, the _make_linked_object method has to be adjusted to get it to work for in the Session class. Class must inherit from BaseSiteComponent

(
        self, identificator_name, identificator, __class: type[C], NotFoundException: type[Exception]
    )

Source from the content-addressed store, hash-verified

1075 # noinspection PyPep8Naming
1076 # Class is camelcase here
1077 def _make_linked_object(
1078 self, identificator_name, identificator, __class: type[C], NotFoundException: type[Exception]
1079 ) -> C:
1080 """
1081 The Session class doesn't save the login in a ._session attribute, but IS the login ITSELF.
1082
1083 Therefore, the _make_linked_object method has to be adjusted
1084 to get it to work for in the Session class.
1085
1086 Class must inherit from BaseSiteComponent
1087 """
1088 # noinspection PyProtectedMember
1089 # _get_object is protected
1090 return commons._get_object(identificator_name, identificator, __class, NotFoundException, self)
1091
1092 def connect_user(self, username: str) -> user.User:
1093 """

Callers 15

connect_userMethod · 0.95
connect_user_by_idMethod · 0.95
connect_projectMethod · 0.95
connect_studioMethod · 0.95
connect_classroomMethod · 0.95
connect_topicMethod · 0.95
__init__Method · 0.45
actorMethod · 0.45
make_linkedMethod · 0.45
authorMethod · 0.45
authorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected