Repository navigation
Description
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
fix: invalid-all-object / E0604