Skip to content

Syntax error when using Mypy and python 3.11 #370

@n4nn31355

Description

@n4nn31355

System Information

  • OS: Windows
  • Blender version: 4.4

Description about the bug

Mypy exits with syntax error when using python 3.11 starting from fake-bpy-module-4.2.

> mypy .
***\blender_ext\Lib\site-packages\bpy\types\__init__.pyi:111576: error: invalid syntax  [syntax]
    class bpy_prop_collection[_GenericType1]:

***\blender_ext\Lib\site-packages\bpy\stub_internal\rna_enums\__init__.pyi:6: error: invalid syntax  [syntax]
    type AssetLibraryTypeItems = typing.Literal[

According to the Discord discussion, this repo uses 3.12 syntax, and while it should work fine with Pyright, mypy has an issue.

Additional comments [Optional]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions