From 338c76c2ca8deb0a6f085e0effe7600f0f836ba9 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Thu, 3 Apr 2025 17:08:13 +0100 Subject: [PATCH] Documentation: Add in @dgmcdonna suggestions/corrections --- CODING_STYLE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODING_STYLE.md b/CODING_STYLE.md index 520450fe8..a4e248ffe 100644 --- a/CODING_STYLE.md +++ b/CODING_STYLE.md @@ -14,10 +14,10 @@ This is heavily based upon https://google.github.io/styleguide/pyguide.html with Imports ------- -Use import statements for packages and modules only, not for individual types, classes, or functions and ideally not aliased naming would cause confusion. This is to prevent people importing an imported method (which can lead to confusion and add in an unnecessary dependency in the import chain). +Use import statements for packages and modules only, not for individual types, classes, or functions and ideally not aliased unless the imported name would cause confusion. This is to prevent people from importing something that was itself imported from elsewhere (which can lead to confusion and add in an unnecessary dependency in the import chain). * Use `import x` for importing packages and modules. -* Use `from x import y where x` is the package prefix and y is the module name with no prefix. +* Use `from x import y` where x is the package prefix and y is the module name with no prefix. * Use `from x import y as z` in any of the following circumstances: * Two modules named `y` are to be imported. * `y` conflicts with a top-level name defined in the current module.