mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-07 14:17:36 -05:00
refactor(build): tighten extract_entries parameter types to ParsedSection/ParsedGroup
Replace loose list[dict] annotations with concrete TypedDicts imported from readme_parser so ty can verify call-site compatibility. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ from pathlib import Path
|
||||
from typing import TypedDict
|
||||
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from readme_parser import parse_readme, parse_sponsors
|
||||
from readme_parser import ParsedGroup, ParsedSection, parse_readme, parse_sponsors
|
||||
|
||||
|
||||
class StarData(TypedDict):
|
||||
@@ -76,8 +76,8 @@ def sort_entries(entries: list[dict]) -> list[dict]:
|
||||
|
||||
|
||||
def extract_entries(
|
||||
categories: list[dict],
|
||||
groups: list[dict],
|
||||
categories: list[ParsedSection],
|
||||
groups: list[ParsedGroup],
|
||||
) -> list[dict]:
|
||||
"""Flatten categories into individual library entries for table display.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user