Eneg

Results 41 comments of Eneg

@onerandomusername pyright tests are borked

> (also, for reference: https://github.com/DisnakeDev/disnake/pull/951) > In disnake.ext.*, imports from the main lib and ext previously were visually separated (by virtue of using absolute imports for the former); the new...

Fyi, there's also a `python.analysis.importFormat` pylance setting that controls how pylance auto-imports stuff, but it is set to `"absolute"` by default

I believe we started using `typing_extensions` at top level; we probably should update the signatures that use overloads to default to `None` for a generic to use the `typing_extensions.TypeVar` +...

We could go the `__repr_attributes__` route for that, just instead of a base class use a decorator.

MVP: ```py class _HasReprAttributes(Protocol): __repr_attributes__: ClassVar[tuple[str, ...]] ReprEnabledT = TypeVar("ReprEnabledT", bound=_HasReprAttributes) def make_repr(cls: type[ReprEnabledT], /) -> type[ReprEnabledT]: def __repr__(self: ReprEnabledT) -> str: attrs = ", ".join( f"{key.lstrip('_')}={getattr(self, key)!r}" for key...

> including all fields in the reprs won't work for classes which have a `ConnectionState` reference, which is most of them. @onerandomusername did say "user creatable", which probably implies no...

Does this actually work for doing ```py view = View() view.add_item(ui.Button()) ``` ? The components are currently typed to default to `None` on creation unless explicitly parametrized (`ui.Button[View](...)`)

> pylance gives me an error because the generic type of Item in the add_item method is unknown. I was asking specifically if this works *after* your fix, but it's...

> If we support typing.Annotated, I could use that. On it