From a95fa26857d1826285e8318854d83a9cff88c259 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 8 May 2025 18:37:45 +0200 Subject: [PATCH] docs/comments: fix typo with wildcard import (#50379) --- lib/spack/docs/packaging_guide.rst | 6 +++--- lib/spack/spack/cmd/style.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 055f3479270..9d28d820285 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -497,7 +497,7 @@ extends Spack's ``Package`` class. For example, here is .. code-block:: python :linenos: - from spack import * + from spack.package import * class Libelf(Package): """ ... description ... """ @@ -1089,7 +1089,7 @@ You've already seen the ``homepage`` and ``url`` package attributes: .. code-block:: python :linenos: - from spack import * + from spack.package import * class Mpich(Package): @@ -6183,7 +6183,7 @@ running: .. code-block:: python - from spack import * + from spack.package import * This is already part of the boilerplate for packages created with ``spack create``. diff --git a/lib/spack/spack/cmd/style.py b/lib/spack/spack/cmd/style.py index ce870f267f6..d6a5e91a15a 100644 --- a/lib/spack/spack/cmd/style.py +++ b/lib/spack/spack/cmd/style.py @@ -56,7 +56,7 @@ def is_package(f): """Whether flake8 should consider a file as a core file or a package. We run flake8 with different exceptions for the core and for - packages, since we allow `from spack import *` and poking globals + packages, since we allow `from spack.package import *` and poking globals into packages. """ return f.startswith("var/spack/") and f.endswith("package.py")