aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Include a comment about the original source in the built scriptTrygve Aaberge2024-02-182-4/+8
|
* Use perl instead of awk to join multiline importsTrygve Aaberge2024-02-181-1/+1
| | | | | Unline the awk command, this works as intended and only joins the imports.
* Handle multiline and indented imports in build.shTrygve Aaberge2024-02-181-2/+6
| | | | | | | | This is pretty hacky, the awk script joins some lines it shouldn't so I should look into that, but now it works without manual changes at least. Any indented import is assumed to be within `if TYPE_CHECKING` and replaced with `pass`.
* Warn when failed tasks are not awaitedTrygve Aaberge2024-02-181-2/+23
| | | | | | | | | | | | | | If the task runner has finished all running/active tasks, there shouldn't be any tasks that hasn't been awaited. If there were (e.g. create_task was used when run_async should have been used), exceptions from those tasks would be silently ignored, so warn about this. The difference between running and active tasks is that active tasks are tasks waiting for a future to resolve, while running tasks include the currently running task. E.g. if task A creates a new task, B, and task B fails before task A has finished, task A won't be in active tasks, so therefore we need a different set to keep track of the running tasks.
* Remove unnecessary checks for dict keysTrygve Aaberge2024-02-183-11/+11
| | | | | With pyright v1.1.292 or later these checks are no longer necessary (they were never necessary for the runtime, only added for pyright).
* Remove explicitly setting ca_certs for websocket-clientTrygve Aaberge2024-02-181-9/+0
| | | | | | | | As far as I can see, this is no longer necessary with v0.36.0 or later[0]. I assume anyone with new enough Python version to run this will have at least this version. [0]: https://github.com/websocket-client/websocket-client/commit/b614606b35a9b336875e46fe6d4e856392cb9b71
* Don't send response into coroutineTrygve Aaberge2024-02-181-16/+13
| | | | It's now set with set_result/set_exception instead.
* Simplify gather and return immediately on exceptionTrygve Aaberge2024-02-181-24/+10
|
* Don't allow /slack (dis)connect when connecting/(dis)connectedTrygve Aaberge2024-02-182-21/+54
|
* Sleep for 100 ms instead of 10 ms in httpTrygve Aaberge2024-02-181-1/+1
|
* Sleep for 1 ms if 0 ms is specifiedTrygve Aaberge2024-02-181-3/+2
| | | | | | | | asyncio.sleep(0) is used to move the task to the back of the event loop. This sleep can be used for the same, however if 0 is specified, WeeChat never calls the callback. This means that the task will silently not continue which is very bad, so make it sleep for 1 ms instead, which is practically the same.
* Simplify setting future_idTrygve Aaberge2024-02-181-4/+1
|
* Log failed async tasks more robustlyTrygve Aaberge2024-02-184-35/+22
|
* Don't set future result in __await__Trygve Aaberge2024-02-184-46/+95
|
* Make Future very similar to asyncio.FutureTrygve Aaberge2024-02-182-25/+101
|
* Cancel connecting when disconnect is calledTrygve Aaberge2024-02-182-2/+25
|
* Make ws and hook internal and instantiate them to NoneTrygve Aaberge2024-02-182-18/+38
|
* Add command /slack disconnectTrygve Aaberge2024-02-183-0/+25
|
* Only connect to all teams in /slack connect when -all is givenTrygve Aaberge2024-02-181-3/+3
|
* Simplify Literal declarationsTrygve Aaberge2024-02-181-9/+7
|
* Replace some usages of Any with proper typesTrygve Aaberge2024-02-186-22/+23
|
* Simplify is_member checkTrygve Aaberge2024-02-181-1/+1
|
* Assume some unknown lists from slack to be list of stringsTrygve Aaberge2024-02-182-4/+4
|
* Fix some mypy specific type issuesTrygve Aaberge2024-02-186-21/+28
|
* Make conversation.name an async function so it always worksTrygve Aaberge2024-02-182-48/+67
|
* Move SlackErrorResponse into slack_common.pyiTrygve Aaberge2024-02-1813-20/+17
|
* Open all conversation types on startTrygve Aaberge2024-02-187-33/+124
|
* Support unfurling special mentions (@here/@channel/@everyone)Trygve Aaberge2024-02-181-0/+5
|
* Support unfurling channelsTrygve Aaberge2024-02-182-3/+29
|
* Simplify SlackMessage._unfurl_refsTrygve Aaberge2024-02-181-47/+22
|
* Use user group fallback nameTrygve Aaberge2024-02-181-3/+7
|
* Handle user group fetch errorTrygve Aaberge2024-02-183-5/+21
|
* Print error when fetching users/usergroups failTrygve Aaberge2024-02-182-0/+13
|
* Improve error printingTrygve Aaberge2024-02-185-15/+37
|
* Simplify unfurl methodsTrygve Aaberge2024-02-181-10/+8
|
* Support unfurling usergroup namesTrygve Aaberge2024-02-189-12/+285
|
* Remove unnecessary _api propertiesTrygve Aaberge2024-02-181-9/+1
|
* Add dev dependencies typing-extensions and pyrightTrygve Aaberge2024-02-182-1/+52
|
* Update dependenciesTrygve Aaberge2024-02-181-158/+138
|
* Fix compatibility with Python 3.7Trygve Aaberge2024-02-1810-15/+21
|
* Fix compatibility with Python 3.8Trygve Aaberge2024-02-182-4/+19
|
* Initial work for matching usergroupsTrygve Aaberge2024-02-182-4/+30
| | | | | Doesn't get info/name yet. Apparently there's no API method for getting info for one usergroup...
* Remove unnecessary id parametersTrygve Aaberge2024-02-182-17/+11
|
* Create common parent class for SlackUsers and SlackBotsTrygve Aaberge2024-02-181-33/+49
|
* Color user mentionsTrygve Aaberge2024-02-182-1/+16
|
* Include options in HttpErrorTrygve Aaberge2024-02-182-4/+12
|
* Fix task exception handlingTrygve Aaberge2024-02-181-2/+9
|
* Fallback to using @<user_id> if user is not found in unfurl_refsTrygve Aaberge2024-02-181-3/+5
| | | | This is what the official web client does.
* Only print/raise errors for finished tasksTrygve Aaberge2024-02-181-12/+21
|
* Use BaseException instead of Exception in task.pyTrygve Aaberge2024-02-181-2/+2
|