Wykres commitów

16 Commity (6715ff3ebd79409eaff357cd5e2e13d837e548c3)

Autor SHA1 Wiadomość Data
Lorenz Diener 6715ff3ebd
Merge pull request #389 from Konano/patch-1
fix: prevent dynamic changes to keyword_args/poll_params
2024-12-01 15:01:24 +02:00
halcy 9ba51c42fa a bunch of fixes to entities and typing, pre starting to merge some PRs 2024-12-01 14:56:08 +02:00
Nano 02dd7967cb
fix(statuses): prevent dynamic changes to `keyword_args`
The use of `locals()` in status_reply caused issues due to its dynamic nature.  When `user_id = self.__get_logged_in_id()` was executed, `locals()` dynamically updated `keyword_args` to include the `self` reference again, even after it was explicitly deleted.  This led to a TypeError: `Mastodon.status_post() got multiple values for argument 'self'`.

This commit resolves the issue by replacing `keyword_args = locals()` with `keyword_args = locals().copy()`.  By creating a static copy of the local variables at the time of execution, it prevents unintended modifications caused by dynamic changes to the local scope.

Fixed #388
2024-11-22 18:02:48 +08:00
halcy 936b77e2ed change some internals and rerun tests, lets see how CI likes this 2024-02-11 15:18:53 +02:00
Ashwin V. Mohanan b09c8915da
Update docstring for visibility with how it is know in Mastodon's UI 2023-11-18 23:27:34 +01:00
Ashwin V. Mohanan 836f3c8283
Format docstring for visibility parameter
Without this change it is easy to get confused while reading the online docs.

https://mastodonpy.readthedocs.io/en/stable/05_statuses.html#status-post
2023-11-16 09:11:11 +01:00
halcy 9b77278b81 very massive commit that adds type annotations everywhere and breaks all the tests lol 2023-06-20 00:35:03 +03:00
Lorenz Diener 3b5c4ae6f5
Merge branch 'master' into master 2023-04-23 18:54:56 +03:00
Lorenz Diener 0e0e8cd687
Merge pull request #327 from alexmshepherd/status_reply-patch
Status reply patch
2023-04-23 18:51:59 +03:00
alex martin shepherd 2905c07863
Add custom exception 2023-03-03 12:47:43 +01:00
alex martin shepherd 92a7cbac35
Clarify status_reply ( #310 ) 2023-03-03 12:43:40 +01:00
amaargiru 68ac32b6be Format code with PEP 8 standards 2023-01-02 18:39:16 +05:00
Miroslav Šedivý 6404765921 refactor: replace lambdas with python 2022-12-03 22:04:26 +01:00
Miroslav Šedivý 325cc917d5 refactor: use f-strings 2022-12-02 22:04:23 +01:00
halcy e483d16014 Finish moving code out into smaller files 2022-12-01 01:39:08 +02:00
halcy a4b2b180d3 More moving functions out 2022-12-01 00:11:17 +02:00