Closed HarHarLinks closed 2 weeks ago
huh this is strange. I saw this with #3 as well where a thing is imported in one of the helper files but the import itself is in __init__.py
. it seemed to work when I've been running it in the fedora bot dev environment. has maubot changed how it evaluates imports in more recent versions?
Regardless i made a fix that should address this in 634d5b9f77c15d49c98da3363083acae92ff2c6a on the dev
branch (keeping it on a separate branch until I can re-test this in fedoras dev environment and confirm it still works)
i think this might work coincidentally in some python environments, but afaik in python you're supposed to import stuff in the files that use it and not rely on import recursion/transitivity
i think this might work coincidentally in some python environments, but afaik in python you're supposed to import stuff in the files that use it and not rely on import recursion/transitivity
yeah, thats normally how I do things - keeping the imports in the right file. i think because it happened to still work in fedoras matrix bot dev environment i never saw these errors in testing and therefore never got that reminder that i also needed to move the imports when refactoring things
https://github.com/MoralCode/maubot-events/blob/7738a7ebe962652b173813da3f626a46be0ac039/event_helper/matrix_utils.py#L52