Skip to content

bug: Griffe warning due to non-string items #349

Closed

Description

@markbujehein

Description

Whenever docs are built, Griffe emits warnings related to invalid-all-object (PLE0604): non-string items defined in easyscience.__all__ and easyscience.variable.__all__.

Griffe only catches these,

WARNING -  griffe: Unsupported item in easyscience.__all__: ModelBase (use strings only)
WARNING -  griffe: Unsupported item in easyscience.__all__: EasyList (use strings only)
WARNING -  griffe: Unsupported item in easyscience.__all__: AvailableMinimizers (use strings only)
WARNING -  griffe: Unsupported item in easyscience.__all__: Fitter (use strings only)
WARNING -  griffe: Unsupported item in easyscience.variable.__all__: DescriptorArray (use strings only)
WARNING -  griffe: Unsupported item in easyscience.variable.__all__: DescriptorBase (use strings only)
WARNING -  griffe: Unsupported item in easyscience.variable.__all__: DescriptorBool (use strings only)
WARNING -  griffe: Unsupported item in easyscience.variable.__all__: DescriptorNumber (use strings only)
WARNING -  griffe: Unsupported item in easyscience.variable.__all__: DescriptorStr (use strings only)
WARNING -  griffe: Unsupported item in easyscience.variable.__all__: Parameter (use strings only)

but since PLE0604 covers all non-strin objects in __all__, all have been fixed.

Why?

The Python Language Reference 7.11. The import statement:

The public names defined by a module are determined by checking the module’s namespace for a variable named __all__; if defined, it must be a sequence of strings which are names defined or imported by that module [...] __all__ should contain the entire public API. It is intended to avoid accidentally exporting items that are not part of the API (such as library modules which were imported and used within the module).

AFAIK, the main issue is that when PLE0604 isn't followed, import statements like from easyscience import * can result in unepected behaviour.

Activity

  1. added
    [scope] bug
    [priority] lowest
    on Oct 27, 2026
  2. added a commit that references this issue on Oct 27, 2026
    c7b8696
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [priority] lowest[scope] bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions