Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Decorator type signatures not recognized by pyright #731

Closed
@charles-dyfis-net

Description

@charles-dyfis-net

...andaccording to pyright upstream, this is a bug in mypy, rather than in pyright.

Type-checking pytest-asyncio itself yields a great many errors, starting with:

pytest-asyncio/pytest_asyncio/plugin.py:57:60 - error: Type variable "_R" has no meaning in this context (reportGeneralTypeIssues)pytest-asyncio/pytest_asyncio/plugin.py:57:36 - error: TypeVar bound type cannot be genericpytest-asyncio/pytest_asyncio/plugin.py:60:65 - error: Type variable "_R" has no meaning in this context (reportGeneralTypeIssues)pytest-asyncio/pytest_asyncio/plugin.py:60:37 - error: TypeVar bound type cannot be generic

...and type-checking a project that uses pytest-asyncio's decorators withreportUntypedFunctionDecorator set in pyright's configuration:

error: Untyped function decorator obscures type of function; ignoring decorator (reportUntypedFunctionDecorator)

I suspect that the option ofeither passing the function to be used as a fixture as a direct argument tofixture()or returning a function that acts as a proper decorator adds complexity here. If it's not possible to be pyright-friendly with the existing calling convention flexibility, might it make sense to offer a less-flexible, more explicitly-typed alternative?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp