DiamondLightSource / DiamondLightSource/httomo
Pyright error if `import httomo` used instead of `import httomo.globals`
- Dominant language
- Python
- Stars
- 10
- Forks
- 5
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
In some places in the codebase where the `httomo.globals` module is used, there is the following error from pyright:
```
"globals" is not a known attribute of module "httomo" [reportAttributeAccessIssue]
```
when accessing variables within `httomo.globals`.
This occurs if the module is accessed via an import doing `import httomo`, like in `test_cli.py`: https://github.com/DiamondLightSource/httomo/blob/3111f23de959f8521edd9024d32c25ebd3b67542/tests/test_cli.py#L88
but does not occur if the module is accessed via an import doing `import httomo.globals`.
This can be resolved by simply replacing `import httomo` with `import httomo.globals` in the relevant modules.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.