Fix up some types in the ecosystem code (#8898)

## Summary

Fixes up the type annotations to make type analyzers a little happier 😄 

## Test Plan

N/A
This commit is contained in:
Steve C 2023-11-30 17:02:20 -05:00 committed by GitHub
parent ee5d95f751
commit 3ee1ec70cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 14 deletions

View file

@ -25,11 +25,11 @@ def markdown_format_result(result: Result) -> str:
"""
Render a `ruff format` ecosystem check result as markdown.
"""
lines = []
lines: list[str] = []
total_lines_removed = total_lines_added = 0
total_files_modified = 0
error_count = len(result.errored)
patch_sets = []
patch_sets: list[PatchSet] = []
for project, comparison in result.completed:
total_lines_added += comparison.diff.lines_added
@ -97,7 +97,7 @@ def format_patchset(patch_set: PatchSet, repo: ClonedRepository) -> str:
"""
Convert a patchset to markdown, adding permalinks to the start of each hunk.
"""
lines = []
lines: list[str] = []
for file_patch in patch_set:
for hunk in file_patch:
# Note: When used for `format` checks, the line number is not exact because