8000 Use __init__.py to simplify imports · Issue #21 · lavinrp/EyeDevelopmentModel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use __init__.py to simplify imports #21

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

Open
lavinrp opened this issue Jun 23, 2019 · 1 comment
Open

Use __init__.py to simplify imports #21

lavinrp opened this issue Jun 23, 2019 · 1 comment

Comments

@lavinrp
Copy link
Owner
lavinrp commented Jun 23, 2019

http://mikegrouchy.com/blog/2012/05/be-pythonic-__init__py.html

lets get rid of the from package.file import File and replace it with from package import File

This can be done by importing the classes within the init.py for each module.

@lavinrp lavinrp added this to the Publication milestone Jun 1, 2021
@lavinrp
Copy link
Owner Author
lavinrp commented Jul 5, 2021

This is actually going to require a rather significant restructure of the project and cannot be done cleanly in the time frame before 1.0. Lets take a look at this for 2.0.

This cause here is that the project is structured with one class per file where the classes and files have the same name.
This is not pythonic and confuses python when it comes time to import things (if we export the symbols into the init.py file).

We probably wont be able to change this in a minor version update either since the required restructuring will break any client code expecting the current format.

@lavinrp lavinrp removed this from the Publication milestone Jul 5, 2021
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

No branches or pull requests

1 participant
0