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

貢獻者指南