OpenwaterHealth/openlifu-python

use absolute rather than relative imports

开放

#13 创建于 2024年6月17日

 (0 条评论) (0 个反应) (1 位负责人)Python (16 个派生)auto 404
good first issue

仓库指标

星标
 (24 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南