Skip to content

Commit b590c84

Browse files
author
Nikolay Dolzhenkov
committed
Prefer List[] instead of list[]
1 parent 20224bc commit b590c84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ninja/filter_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ def _get_field_q_expression(
102102
self,
103103
field_name: str,
104104
field_info: FieldInfo,
105-
default: Union[str, list[str], None] = None,
105+
default: Union[str, List[str], None] = None,
106106
) -> Union[str, List[str], None]:
107107
filter_lookup = self._get_filter_lookup(field_name, field_info)
108108
if filter_lookup:
109109
return filter_lookup.q if filter_lookup.q is not None else default
110110

111111
# Legacy approach, consider removing in future versions
112112
field_extra = cast(dict, field_info.json_schema_extra) or {}
113-
return cast(Union[str, list[str], None], field_extra.get("q", default))
113+
return cast(Union[str, List[str], None], field_extra.get("q", default))
114114

115115
def _get_field_expression_connector(
116116
self,

0 commit comments

Comments
 (0)