Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: subpackage changes not autoreloaded #293

Merged

Conversation

iisakkirotko
Copy link
Collaborator

Fixes issue #281.

Comment on lines 85 to 86
package_root_path = Path(mod.__file__).parent
reload.reloader.root_path = package_root_path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be conditional (looking at the mypy error) when mod.file is None, we just skip this I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the change. Shouldn't worry too much about the ~30 errors from Python 3.9?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it is a seperate issue, we don't need to fix it in this PR.

@maartenbreddels
Copy link
Contributor

Also fixes #242

@maartenbreddels maartenbreddels merged commit a747a68 into widgetti:master Sep 15, 2023
20 of 21 checks passed
@maartenbreddels
Copy link
Contributor

Thanks 👍

iisakkirotko added a commit to iisakkirotko/solara that referenced this pull request Sep 29, 2023
…ti#293)

* fix: subpackage changes not autoreloaded

* fix: MyPy error when mod.__file__ is None
@iisakkirotko iisakkirotko deleted the fix-autoreload-subpackages branch October 10, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants