Skip to content

Release/v0.4.1 - #1

Merged
rus07tam merged 12 commits into
RuJect:mainfrom
rus07tam:release/v0.4.1
Oct 27, 2025
Merged

Release/v0.4.1#1
rus07tam merged 12 commits into
RuJect:mainfrom
rus07tam:release/v0.4.1

Conversation

@rus07tam

@rus07tam rus07tam commented Oct 27, 2025

Copy link
Copy Markdown
Member

Changelog:

  • Update README
  • Added cond to rx
  • Added get_fields to Field
  • Fixed AsyncBindable & Bindable
  • Improved ClassProperty
  • Added name and __slots__ to Property

from .property import Property


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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 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:

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

This comment was generated by an experimental AI tool.

from typing import Callable


def cond[**P, T, F](

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 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:

Suggested change
def cond[**P, T, F](
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.

@rus07tam
rus07tam merged commit 4f258ff into RuJect:main Oct 27, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant