Skip to content

fix: eliminate all baselined Pyrefly errors - #2368

Merged
schloerke merged 3 commits into
mainfrom
reduce-pyrefly-errors
Jul 30, 2026
Merged

schloerke merged 3 commits into
mainfrom
reduce-pyrefly-errors

Conversation

@karangattu

@karangattu karangattu commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR resolves all 235 errors previously recorded in pyrefly-baseline.json, leaving the baseline empty.

The changes:

  • Tighten types across UI components, rendering utilities, OpenTelemetry, and Playwright helpers
  • Add explicit types where Pyrefly could not infer callbacks, attributes, or empty containers
  • Correct TypedDict access and generic/ParamSpec usage
  • Update tests and example apps to satisfy the stricter types
  • Handle the version-dependent Uvicorn Multiprocess constructor without conflicting type-ignore comments
  • Preserve compatibility with both older supported Uvicorn releases and Uvicorn 0.51+

@karangattu karangattu changed the title fix: address review feedback on Pyrefly config fix: Reduce Pyrefly errors Jul 23, 2026
@karangattu karangattu changed the title fix: Reduce Pyrefly errors fix: eliminate all baselined Pyrefly errors Jul 23, 2026
@karangattu
karangattu requested a review from schloerke July 23, 2026 22:33
… shared dict

`wrap_all_in_gap_spaced_container()` hoisted a single `TagAttrs` dict out of
the loop and passed it to every child's `div()`. That is only safe because
htmltools copies attrs into a fresh `TagAttrDict` per tag; nothing in this
file stated that dependency. Passing `class_=` instead gives each wrapper its
own attributes and drops the `TagAttrs` annotation the dict needed.

Rendered HTML is unchanged (verified byte-identical across layout_column_wrap
and layout_columns with fillable on/off, col_widths, and a user `class_`).
Adds unit coverage for the wrapper class values.
@schloerke
schloerke merged commit 17a75f0 into main Jul 30, 2026
344 of 347 checks passed
@schloerke
schloerke deleted the reduce-pyrefly-errors branch July 30, 2026 14:37
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