tektronix / tektronix/tm_data_types

[BUG]: Pyright failures due to numpy typing

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
8
Forks
14
Avg merge
3d 10h
Merged PRs (30d)
4

Description

Description of the bug

Currently pyright fails with a massive amount of warnings.
This is due to the nature of generic types and how numpy applies type hinting.
The problem is figuring out how to apply generic dtype type hinting for arrays, such as ndarrays. There also needs to be a way to properly type hint the dtype itself. Solving this will improve type safety and clarity when working with arrays in the code.

Steps To Reproduce

Run pyright

Environment Information

Ensure pyright is installed in the virtual environment.
Activate the virtual environment.

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Activate the virtual environment and run pyright to capture the current warnings. Review the existing array and dtype annotations, then define and validate a typing approach that handles generic ndarray dtypes and dtype objects while resolving the reported pyright failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.