Skip to content

Update from ... import statements in ISIS_Powder units #33388

@DannyHindson

Description

@DannyHindson

There are various from ... import statements in the ISIS_Powder units that rely on the mantid-scripts.pth file having been processed so that all of the scripts subdirectories (eg Diffraction, Engineering etc) are present on the sys path. These statements generate red highlights in PyCharm because the .pth file is only processed at run time whenever the mantid.simpleapi is imported:

image

This means there are various distracting errors highlighted by PyCharm and it also means that if you have a unit that doesn't contain import mantid.simpleapi the from ... import statement will fail (even though the same statement works at run time in another unit)

If the module paths were extended with a Diffraction prefix (eg from Diffraction.isis_powder import X) I think the PyCharm warnings would go away and this would be a lot more transparent

Metadata

Metadata

Assignees

No one assigned

    Labels

    ISIS: DiffractionIssue and pull requests relating to Diffraction at ISISMaintenanceUnassigned issues to be addressed in the next maintenance period.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions