Release/v0.4.1 #1

Merged
rus07tam merged 12 commits from release/v0.4.1 into main 2025-10-27 15:05:33 +03:00
rus07tam commented 2025-10-27 14:59:33 +03:00 (Migrated from github.com)

Changelog:

  • Update README
  • Added cond to rx
  • Added get_fields to Field
  • Fixed AsyncBindable & Bindable
  • Improved ClassProperty
  • Added name and __slots__ to Property
Changelog: - Update README - Added `cond` to `rx` - Added `get_fields` to `Field` - Fixed `AsyncBindable` & `Bindable` - Improved `ClassProperty` - Added name and `__slots__` to `Property`
codacy-production[bot] (Migrated from github.com) reviewed 2025-10-27 15:04:50 +03:00
@ -5,1 +6,4 @@
class Readonly[T](Property[T]):
"""
codacy-production[bot] (Migrated from github.com) commented 2025-10-27 15:04:50 +03:00

🚫 Codacy found a high ErrorProne issue: invalid syntax (F999)

The issue arises from the use of generics in the class definition. The syntax Readonly[T](Property[T]) is incorrect in Python, as the use of generics requires the Generic base class from the typing module. To fix this, you need to inherit from Generic[T] in addition to Property[T].

Here's the code suggestion to fix the issue:

class Readonly(Property[T], Generic[T]):

This comment was generated by an experimental AI tool.

:no_entry_sign: **Codacy** found a **high ErrorProne** issue: [invalid syntax (F999)](https://app.codacy.com/gh/RuJect/snakia/pull-requests/1) The issue arises from the use of generics in the class definition. The syntax `Readonly[T](Property[T])` is incorrect in Python, as the use of generics requires the `Generic` base class from the `typing` module. To fix this, you need to inherit from `Generic[T]` in addition to `Property[T]`. Here's the code suggestion to fix the issue: ```suggestion class Readonly(Property[T], Generic[T]): ``` --- *This comment was generated by an experimental AI tool.*
codacy-production[bot] (Migrated from github.com) reviewed 2025-10-27 15:04:50 +03:00
@ -0,0 +1,13 @@
from typing import Callable
def cond[**P, T, F](
codacy-production[bot] (Migrated from github.com) commented 2025-10-27 15:04:50 +03:00

🚫 Codacy found a high ErrorProne issue: expected '(' (F999)

The issue reported by the Prospector linter is due to the incorrect syntax used for the type parameters in the function definition. In Python's type hinting, you cannot use square brackets [] for defining type variables; instead, you should use parentheses () with the TypeVar function from the typing module.

To fix the issue, you need to change the definition of the cond function to use TypeVar for the type parameters. Here's the single line change needed:

def cond(P, T, F)(condition: Callable[P, bool], if_true: Callable[P, T], if_false: Callable[P, F]) -> Callable[P, T | F]:

This comment was generated by an experimental AI tool.

:no_entry_sign: **Codacy** found a **high ErrorProne** issue: [expected '(' (F999)](https://app.codacy.com/gh/RuJect/snakia/pull-requests/1) The issue reported by the Prospector linter is due to the incorrect syntax used for the type parameters in the function definition. In Python's type hinting, you cannot use square brackets `[]` for defining type variables; instead, you should use parentheses `()` with the `TypeVar` function from the `typing` module. To fix the issue, you need to change the definition of the `cond` function to use `TypeVar` for the type parameters. Here's the single line change needed: ```suggestion def cond(P, T, F)(condition: Callable[P, bool], if_true: Callable[P, T], if_false: Callable[P, F]) -> Callable[P, T | F]: ``` --- *This comment was generated by an experimental AI tool.*
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: RuJect/snakia#1
No description provided.