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

Split __main__.py across different files #97

Open
n0toose opened this issue Aug 19, 2022 · 2 comments
Open

Split __main__.py across different files #97

n0toose opened this issue Aug 19, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@n0toose
Copy link
Collaborator

n0toose commented Aug 19, 2022

If everything is under one file, syncMyMoodle will keep getting progressively harder to maintain and modify.

A better approach would be keeping the core functionality of main() under __main__.py and putting things like class definitions to other files. The goal here would be making the code even more "OOP"-like than it already is and improve modularity. This should help with developing additional extensions in the long run.

@septatrix
Copy link
Collaborator

This is already partially done on the v2 branch (on which I haven't worked in ages).
My eventual goal which is not yet implemented on v2 would be to provide a decorator which can register handers for each module and pass in the session

@n0toose n0toose added the enhancement New feature or request label Oct 24, 2022
@n0toose
Copy link
Collaborator Author

n0toose commented Oct 24, 2022

Is it possible for us to eventually apply some of your work onto the main branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants