Skip to content

Commit cffe94f

Browse files
committed
Fix pyrefly type inference error
Add explicit type annotation for mismatches list to help pyrefly 0.38.2 correctly infer the return type.
1 parent 9884158 commit cffe94f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

daffy/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _find_dtype_mismatches(
3434
column_spec: Union[str, RegexColumnDef], df: DataFrameType, expected_dtype: Any, df_columns: List[str]
3535
) -> List[Tuple[str, Any, Any]]:
3636
"""Find dtype mismatches for a single column specification."""
37-
mismatches = []
37+
mismatches: List[Tuple[str, Any, Any]] = []
3838
if isinstance(column_spec, str):
3939
if column_spec in df_columns and df[column_spec].dtype != expected_dtype:
4040
mismatches.append((column_spec, df[column_spec].dtype, expected_dtype))

0 commit comments

Comments
 (0)