Skip to content

Commit

Permalink
relax mypy requirement, fix mypy 1.6 warnings (streamlit#7551)
Browse files Browse the repository at this point in the history
  • Loading branch information
kajarenc authored Oct 13, 2023
1 parent 1ecb4e4 commit 71f49ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
black>=22.3.0
pre-commit
hypothesis>=6.17.4
mypy>=1.4, <1.6
mypy>=1.4
mypy-protobuf>=3.2
parameterized
# Lower protobuf versions cause mypy issues during development builds
Expand Down
4 changes: 2 additions & 2 deletions lib/streamlit/delta_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _get_delta_path_str(self) -> str:
return str(dg._cursor.delta_path) if dg._cursor is not None else "[]"

@overload
def _enqueue( # type: ignore[misc]
def _enqueue(
self,
delta_type: str,
element_proto: Message,
Expand All @@ -427,7 +427,7 @@ def _enqueue( # type: ignore[misc]
...

@overload
def _enqueue( # type: ignore[misc]
def _enqueue(
self,
delta_type: str,
element_proto: Message,
Expand Down
2 changes: 1 addition & 1 deletion lib/streamlit/elements/widgets/time_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ def parse_date_deterministic(
elif isinstance(value, (datetime, date)):
parsed = parse_date_deterministic(value)
else:
parsed = [parse_date_deterministic(v) for v in value]
parsed = [parse_date_deterministic(cast(SingleDateValue, v)) for v in value]

# TODO this is missing the error path, integrate with the dateinputvalues parsing

Expand Down

0 comments on commit 71f49ec

Please sign in to comment.