Import _complextype conditionally based on the usage of complex type for individual drivers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Description
We should solve the needless import of _complextype together with needless import of _visatype (if such thing happens). In its own PR. Please open an issue.
Originally posted by @marcoskirsch in https://github.com/ni/nimi-python/pull/2098#discussion_r2129228871
Currently _complextype is imported for all the modules (as shown below) . We need to conditionally import it based on its usage
${module_name}._complextype import * # noqa: F401,F403,H303
Importing of _complextype gives capability of including the complex data types.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the generated individual driver modules and the ${module_name}._complextype import shown in the issue. Trace how each module's use of complex types is determined, including whether _visatype is also imported unnecessarily. Done means drivers import these modules only when their generated code uses them, with existing generation and import checks still passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100