Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polling: fix strange state dependency #790

Open
timoniq opened this issue Aug 24, 2023 · 0 comments
Open

Polling: fix strange state dependency #790

timoniq opened this issue Aug 24, 2023 · 0 comments
Assignees
Labels
feature-request New feature or request

Comments

@timoniq
Copy link
Member

timoniq commented Aug 24, 2023

Описание

def construct(
self, api: "ABCAPI", error_handler: Optional["ABCErrorHandler"] = None
) -> "BotPolling":
self._api = api
if error_handler is not None:
self.error_handler = error_handler
return self
@property
def api(self) -> "ABCAPI":
if self._api is None:
raise NotImplementedError(
"You must construct polling with API before try to access api property of Polling"
)
return self._api

Пример кода

No response

@timoniq timoniq added the feature-request New feature or request label Aug 24, 2023
@timoniq timoniq self-assigned this Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant