Находки в опенсорсе: Python
982 subscribers
4 photos
221 links
Легкие задачки в опенсорсе из мира Python

Чат: @opensource_findings_chat
Download Telegram
🚀 New issue to wemake-services/wemake-python-styleguide by @sobolevn
📝 Remove `WPS354` (#3601)


This rules has more problems that it solves:

1. Two yields and yield from are two different things
2. Async iterators cannot use yield from, but WPS354 still raises even in async def

So, it is time to remove this rule. I was wrong about that :(
See other rules with disabled_since attribute on how to disable a rule.


#feature #help_wanted #levelstarter #good_first_issue #wemake_python_styleguide #wps
sent via relator
🫡1
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Add `RefreshTokenSyncController` and `RefreshTokenAsyncController` (#907)


Add RefreshTokenSyncController and RefreshTokenAsyncController

Basically, they should accept refresh_token and return new pairs of access_token and refresh_token. But they should be reusable as well as the existing controllers.

It should be similar to the existing views:

django-modern-rest/dmr/security/jwt/views.py

Lines 99 to 132 in dba07e8

Example from a real project: https://github.com/Griger10/g-pulse/blob/3d520b8444736eaaeffad1cf2221019f3ffad6c4/services/api/apps/accounts/api/views.py#L93


#feature #good_first_issue #help_wanted #django_modern_rest
sent via relator
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Convert our `Empty` class usage to `typing_extensions.Sentinel` (#995)


Current way:

django-modern-rest/dmr/types.py

Lines 48 to 55 in 5ca7975

New (modern) way: https://typing-extensions.readthedocs.io/en/latest/#typing_extensions.Sentinel

1. We need to change how EmptyObj is defined to be EMPTY: Final = Sentinel('EMPTY')
2. We need to change all isinstance(..., Empty) to check for the sentinel

This is a very easy task for new contributors :)


#feature #good_first_issue #help_wanted #django_modern_rest
sent via relator
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Add default admin page for `dmr/security/jwt/blocklist` (#1054)


Right now our app for jwt blocklisting has a default model: https://github.com/wemake-services/django-modern-rest/blob/master/dmr/security/jwt/blocklist/models.py

But, it does not have a default admin.py file.
Good example: https://github.com/Dresdn/django-modern-rest/blob/3324d0aecf32509b5434df7e8826d7be6ddac7a8/dmr/security/token/admin.py

This is a very easy task :)


#feature #good_first_issue #help_wanted #django_modern_rest
sent via relator