OpenwaterHealth/openlifu-python

use absolute rather than relative imports

Ouverte

#13 ouverte le 17 juin 2024

 (0 commentaire) (0 réaction) (1 personne assignée)Python (16 forks)auto 404
good first issue

Métriques du dépôt

Stars
 (24 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

This is a style suggestion and we may decide to close it if absolute imports are too unwieldy and verbose.

See https://peps.python.org/pep-0008/#imports :

Absolute imports are recommended, as they are usually more readable and tend to be better behaved (or at least give better error messages) if the import system is incorrectly configured (such as when a directory inside a package ends up on sys.path) ... ... However, explicit relative imports are an acceptable alternative to absolute imports, especially when dealing with complex package layouts where using absolute imports would be unnecessarily verbose

Guide contributeur