mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Add mypy type check for uv-python scripts (#5332)
## Summary Per https://github.com/astral-sh/uv/pull/4853#issuecomment-2212505407 > If we're going to aim for full type coverage, we should probably follow this by adding type checking in CI too otherwise it seems too easy for it to become out of date.
This commit is contained in:
parent
025f2f3162
commit
43084249ee
4 changed files with 35 additions and 17 deletions
|
@ -14,12 +14,13 @@ Usage:
|
|||
uv run --isolated -- crates/uv-python/template-download-metadata.py
|
||||
"""
|
||||
|
||||
import sys
|
||||
import logging
|
||||
import argparse
|
||||
import json
|
||||
import logging
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import chevron_blue
|
||||
|
||||
|
@ -66,10 +67,10 @@ def prepare_value(value: dict) -> dict:
|
|||
return value
|
||||
|
||||
|
||||
def main():
|
||||
def main() -> None:
|
||||
debug = logging.getLogger().getEffectiveLevel() <= logging.DEBUG
|
||||
|
||||
data = {}
|
||||
data: dict[str, Any] = {}
|
||||
data["generated_with"] = Path(__file__).relative_to(WORKSPACE_ROOT).as_posix()
|
||||
data["generated_from"] = TEMPLATE.relative_to(WORKSPACE_ROOT).as_posix()
|
||||
data["versions"] = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue