mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-07 14:17:36 -05:00
[PR #3076] [MERGED] chore: simplify website/ Python and polish sponsors section #11352
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vinta/awesome-python/pull/3076
Author: @vinta
Created: 4/19/2026
Status: ✅ Merged
Merged: 4/19/2026
Merged by: @vinta
Base:
master← Head:chore/code-cleanup📝 Commits (10+)
b897676refactor(fetch_github_stars): remove redundant early-return guard in build_graphql_querye47d229refactor(readme_parser): consolidate state reset to tail of flush_groupa358d45refactor: use datetime.UTC alias instead of timezone.utcb9236c4refactor(fetch_github_stars): drop unnecessary keyword-only marker on fetch_batchc85f81brefactor(build): accept Path directly in build() signature7f4a163refactor(build): tighten extract_entries parameter types to ParsedSection/ParsedGroup7e7de19refactor(build): remove StarData TypedDict, loosen load_stars return to dict[str, dict]e0b0dc9refactor(readme_parser): add _href helper to narrow attrGet return type486fbf2refactor(readme_parser): replace _find_first_link with _find_child(inline, "link")85b55efrefactor(readme_parser): inline _is_leading_link at its call site📊 Changes
7 files changed (+116 additions, -190 deletions)
View changed files
📝
website/build.py(+38 -56)📝
website/fetch_github_stars.py(+11 -15)📝
website/readme_parser.py(+53 -70)📝
website/static/style.css(+6 -19)📝
website/templates/index.html(+0 -1)📝
website/tests/test_build.py(+5 -25)📝
website/tests/test_readme_parser.py(+3 -4)📄 Description
Summary
website/(17 commits): deleted dead code, tightened types, modernized syntax. Tests: 117 → 113 (4format_stars_shorttests removed along with the inlined function).uvx ty check website/: 15 diagnostics → 0.Python cleanup highlights
_find_first_link,_is_leading_link,format_stars_short) and staleStarDataTypedDictextract_entriesparameter types,build()now takesPath,load_starsreturnsdict[str, dict]_hrefhelper to narrowattrGet("href")return typeitertools.batched(3.13 stdlib)timedeltainstead oftotal_seconds()/3600render_inline_html/render_inline_textinto a shared_render_inlinehelper_parse_sponsor_itemdouble-walk into a single passdatetime.now(timezone.utc)→datetime.now(UTC)test_readme_parserto usepathlibSponsors styling
.sponsor-meta .section-label:--text-sm→--text-lg<span class="sponsor-become-arrow">+ orphaned CSS rules.sponsor-become:border-bottom+padding-bottom→text-decoration: underlinewithtext-underline-offset: 0.2em--accent-underline(lighter tan)Test plan
uv run pytest— 113 passinguvx ty check website/— all checks passedmake preview)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.