deepmodeling / deepmodeling/dpgui
[Code scan] Align build hook annotations with the advertised Python 3.7/3.8 support
- Dominant language
- Vue
- Stars
- 9
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
This issue was found during a Codex global code scan of the repository.
Baseline commit: e3c5b38a99eb7ab778b5d8c68a5ed4ddf6cf91b3
Problem
The project advertises Python 3.7 and 3.8 support, but the Hatch build hook uses `dict[str, Any]` in a runtime-evaluated annotation. Built-in collection generics require Python 3.9 unless annotations are postponed.
Code references:
https://github.com/deepmodeling/dpgui/blob/e3c5b38a99eb7ab778b5d8c68a5ed4ddf6cf91b3/pyproject.toml#L19-L35
https://github.com/deepmodeling/dpgui/blob/e3c5b38a99eb7ab778b5d8c68a5ed4ddf6cf91b3/hatch_build.py#L23
Relevant snippet:
```py
def initialize(self, version: str, build_data: dict[str, Any]) -> None:
```
Impact
Source builds on the advertised Python 3.7/3.8 versions can fail when Hatch imports the build hook, before the frontend build step starts.
Suggested fix
Either add `from __future__ import annotations`, replace the annotation with `typing.Dict[str, Any]`, or drop Python 3.7/3.8 from the supported metadata if they are no longer intended.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.