This will only work with a monospaced font. Steps ( int) – The number of iterations between sleeps. Iterable ( Iterable) – The iterable to make async.ĭelay ( Union ) – The amount of time in seconds to sleep. That sleeps for delay seconds every steps items. AsyncIter ( iterable, delay = 0, steps = 1 ) ¶īases: AsyncIterator, Awaitable]Īsynchronous iterator yielding items from iterable When attempting to parse the info.json for the end_user_data_statement key.Ĭlass. UnicodeError – When info.json can’t be decoded due to bad encoding.Įxception – Any other exception raised from pathlib and json modules Json.JSONDecodeError – When info.json can’t be decoded with json.load() KeyError – When info.json does not have the end_user_data_statement key. Return typeįileNotFoundError – When info.json does not exist. ![]() The end user data statement found in the info.json. This function attempts to get the end_user_data_statement key from cog’s info.json. get_end_user_data_statement_or_raise ( file ) ¶ > # In cog's `_init_.py` > from import get_end_user_data_statement > _red_end_user_data_statement_ = get_end_user_data_statement ( _file_ ) > def setup ( bot ). Or None if there was an issue finding one. The end user data statement found in the info.json Parametersįile ( Union ) – The _file_ variable for the cog’s _init_.py file. This will log the reason if None is returned. Returns a list of all unique items in iterables, in the order they TypeError – When invalid parameters are passed. bounded_gather_iter ( * coros_or_futures, limit = 4, semaphore = None ) ¶Īn iterator that returns tasks as they are ready, but limits the Semaphore (Optional) – The semaphore to use for bounding tasks. Limit (Optional) – The maximum number of concurrent tasks. Return_exceptions ( bool) – If true, gather exceptions in the result list instead of raising. *coros_or_futures – The awaitables to run in a bounded concurrent fashion. ![]() bounded_gather ( * coros_or_futures, return_exceptions = False, limit = 4, semaphore = None ) ¶Ī semaphore-bounded wrapper to asyncio.gather().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |