Access Add-on preferences property in a multi-file add-on I have a multi-file/multi-folder add-on, with preferences properties created in a prefs.py.

import bpy

class AddonPreferences(bpy.types.AddonPreferences):
    bl_idname = __package__

    my_property : bpy.props.BoolProperty(
        name = "my_bool",
    )


I can easily access this bool in my init.py with:

bpy.context.preferences.addons[__package__].preferences.my_property


But I can't manage to access it in panel.py placed in a UI folder. What is the correct way to call that property in a multi-file add-on?
I recently came across the same issue while developing an addon. I got a workaround from looking at this code of BlendLuxcore: use a mixture of basename and dirname from os.path to get to the folder name of your addon.