Apps Refactor: Refactor all imports to use module namespaces #204
Labels
epic
A collection issues ultimately aligning to the same goal/outcome.
type: housekeeping
Changes to the application which do not directly impact the end user
Proposed Changes
Currently in the code base there are many examples of large imports into the global namespace. For example, here is a sample of forms-related imports from
nautobot/extras/forms.py
:I'm proposing we move to this pattern:
Justification
The current pattern is not only is unwieldy, but complicates merges, rebases, and refactors and in some cases can result in circular imports.
This way it's clear what is coming from Django
forms
and what is coming from internalforms
modules, and any time something new is needed or used fromnautobot.utilities.forms
it doesn't need to be explicitly imported.This also applies to more than just forms, but I was just selecting forms as a singular example of imports for a single module.
TODO
Related
The text was updated successfully, but these errors were encountered: