-
Ensure each file ends with a single blank line.
-
Add a blank line between different groups of imports and ensure appropriate ordering of imports.
Imports should be grouped in the following order:
1.Standard library imports.
2.Related third party imports.
3.Local application/library specific imports.
Good example
from django.urls import path
from taxi.views import index
Bad example:
from django.urls import path
from taxi.views import index
- Use absolute imports instead of relative imports
Good example:
from taxi.views import index
Bad example:
from .views import index
- Don't forget to delete comments when you are ready to commit and push your code.