From fc3b4a653ed8a66d349ca7881a2451fa7b15741f Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 28 Jun 2024 15:00:25 -0700 Subject: [PATCH] Add a development documentation note about using fully qualified imports. --- docs/how-to/develop-on-borgmatic.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/how-to/develop-on-borgmatic.md b/docs/how-to/develop-on-borgmatic.md index 71db8bbe..7f7ac826 100644 --- a/docs/how-to/develop-on-borgmatic.md +++ b/docs/how-to/develop-on-borgmatic.md @@ -152,8 +152,11 @@ the following deviations from it: * In general, spell out words in variable names instead of shortening them. So, think `index` instead of `idx`. There are some notable exceptions to this though (like `config`). - * Favor blank lines around `if` statements, `return`s, logical code groupings, - etc. Readability is more important than packing the code tightly. + * Favor blank lines around logical code groupings, `if` statements, + `return`s, etc. Readability is more important than packing code tightly. + * Import fully qualified Python modules instead of importing individual + functions, classes, or constants (e.g., do `import os.path` instead of + `from os import path`). borgmatic code uses the [Black](https://black.readthedocs.io/en/stable/) code formatter, the [Flake8](http://flake8.pycqa.org/en/latest/) code checker, and