fake-bpy-module
fake-bpy-module copied to clipboard
AddonPreferences.layout has a redundant `| None` in the type
Which leads to the issues in the draw() method:
import bpy
from typing import assert_type
class ADDON_preferences(bpy.types.AddonPreferences):
def draw(self, context):
# "assert_type" mismatch: expected "UILayout" but received "UILayout | None"
assert_type(self.layout, bpy.types.UILayout)
layout = self.layout
# "box" is not a known attribute of "None"
box = layout.box()
# "row" is not a known attribute of "None"
row = layout.row()