Skip to content

Improve dtype type hints with type stubs#2274

Merged
tbennun merged 8 commits intomainfrom
typehint-nowarn
Jan 22, 2026
Merged

Improve dtype type hints with type stubs#2274
tbennun merged 8 commits intomainfrom
typehint-nowarn

Conversation

@tbennun
Copy link
Copy Markdown
Collaborator

@tbennun tbennun commented Jan 18, 2026

This PR stops the mypy/pyright warnings when using dace.* types, and also shows them as numpy arrays for code completion purposes.

@tbennun tbennun requested a review from ThrudPrimrose January 18, 2026 23:05
@tbennun tbennun changed the title Improve dtype type hints to avoid warnings Improve dtype type hints with type stubs Jan 18, 2026
@tbennun tbennun requested a review from pratyai January 22, 2026 15:26
@pratyai
Copy link
Copy Markdown
Collaborator

pratyai commented Jan 22, 2026

(I ran pyright over the project out of curiosity. No action needed, just FYI)
pyright report: https://polybox.ethz.ch/index.php/s/5oSFR3tQTR9FD2y
from this config:

~/g/main-dace (typehint-nowarn|✔) $ cat pyrightconfig.json 
{
  "include": [
    "dace",
    "tests",
    "samples",
    "tutorials",
    "setup.py"
  ],
  "exclude": [
    "**/__pycache__",
    ".dacecache",
    "build",
    "dist",
    ".git",
    "**/.*"
  ],
  "venvPath": ".",
  "venv": ".venv",
  "pythonVersion": "3.14",
  "typeCheckingMode": "strict",
  "reportMissingTypeStubs": true,
  "reportUnusedImport": false
}

@tbennun
Copy link
Copy Markdown
Collaborator Author

tbennun commented Jan 22, 2026

@pratyai looks like mostly localized missing type hints. I'd leave that for another PR

@tbennun tbennun added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit e452136 Jan 22, 2026
12 checks passed
@tbennun tbennun deleted the typehint-nowarn branch January 22, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants