Skip to content

Conversation

lyova24
Copy link
Contributor

@lyova24 lyova24 commented Oct 4, 2025

Replaced all relative imports (e.g., from ...utils import ...) with in-package absolute imports (e.g., from django_mongodb_backend.utils import ...) across the codebase in ./django_mongodb_backend.

A similar PR for Django

FYI: used my own pre-commit-hook shrimport

@aclark4life
Copy link
Collaborator

Thank you! We'll follow the discussion and discuss here once that PR gets merged.

In a large project like Django I think you can make the argument that relative imports can be confusing though I'm not sure they are as confusing in this project. Still, we appreciate the contribution. 🙏

@timgraham timgraham changed the title INTPYTHON-777 Convert all relative imports to in-package absolute ones in ./django_mongodb_backend INTPYTHON-777 Convert multi-level relative imports to absolute Oct 6, 2025
Copy link
Collaborator

@timgraham timgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference... similar to Django, I wouldn't require a Jira issue for cosmetic clean ups.

@timgraham timgraham merged commit 49a14d9 into mongodb:main Oct 6, 2025
17 checks passed
@lyova24 lyova24 deleted the INTPYTHON-777 branch October 7, 2025 06:00
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

Successfully merging this pull request may close these issues.

3 participants