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]
)
| 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 | """ |
no outgoing calls
no test coverage detected