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

Convention for imports #147

Closed
math-fehr opened this issue Jul 22, 2022 · 3 comments
Closed

Convention for imports #147

math-fehr opened this issue Jul 22, 2022 · 3 comments

Comments

@math-fehr
Copy link
Collaborator

We just merged George PR that remove star imports from imports.
I feel that there are other conventions we should follow for imports, and I'm not really aware of the ones that are used in practice.
@georgebisbas, @webmiche, @ingomueller-net, do you have good pointers for conventions that are normally used, and if possible, CIs that would enforce that?

@ingomueller-net
Copy link
Contributor

I have used pylint in a past project and found it quite helpful. It has several checks related to imports, which can enforce a few things conveniently. (The other checks can be deactivated, if only imports should be checked.)

@webmiche
Copy link
Collaborator

I have heard that enforcing an order on imports (like we do in the mlir converter) is bad style (here, e.g.).

I feel that the fundamental problem is more in the python bindings than in our code, but I guess changing that would be very hard, so we might want to do some more engineering.

@superlopuh
Copy link
Member

ruff decides this for us now!

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

4 participants