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

Harmonise Imports #194

Open
stufisher opened this issue Jul 15, 2022 · 0 comments
Open

Harmonise Imports #194

stufisher opened this issue Jul 15, 2022 · 0 comments
Labels

Comments

@stufisher
Copy link
Collaborator

stufisher commented Jul 15, 2022

At the moment we have a mixture of local and absolute imports within the project

from pyispyb.app.extensions.auth.AbstractAuthentication import AbstractAuthentication
from .extensions.auth.bearer import JWTBearer

I think i'd prefer relative imports if the paths arent crazy (we'll have to check the rest of the source)

And also whats imported in what order, i would usually import as follows

import pythonstandards
import os
import sys

import dependency1
import fastapi

import local
from .module import a

This makes it clear whats a standard module, whats a dependency, and whats relative to the package. I'm open to discussion on this.

We should probably also apply isort to sort imports alphabetically

@stufisher stufisher added framework/architecture code quality improvement Improvement of an existing feature labels Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant