Skip to content

Commit

Permalink
Rename two typeddicts to make it clearer that they reference the retu…
Browse files Browse the repository at this point in the history
…rn type of functions
  • Loading branch information
binste committed Jun 16, 2023
1 parent fa9c081 commit 1b0d531
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions altair/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ class _CsvFormatDict(TypedDict):
type: Literal["csv"]


class _DataJsonUrlDict(TypedDict):
class _ToJsonReturnUrlDict(TypedDict):
url: str
format: _JsonFormatDict


class _DataCsvUrlDict(TypedDict):
class _ToCsvReturnUrlDict(TypedDict):
url: str
format: _CsvFormatDict

Expand All @@ -173,7 +173,7 @@ def to_json(
extension: str = "json",
filename: str = "{prefix}-{hash}.{extension}",
urlpath: str = "",
) -> _DataJsonUrlDict:
) -> _ToJsonReturnUrlDict:
"""
Write the data model to a .json file and return a url based data model.
"""
Expand All @@ -192,7 +192,7 @@ def to_csv(
extension: str = "csv",
filename: str = "{prefix}-{hash}.{extension}",
urlpath: str = "",
) -> _DataCsvUrlDict:
) -> _ToCsvReturnUrlDict:
"""Write the data model to a .csv file and return a url based data model."""
data_csv = _data_to_csv_string(data)
data_hash = _compute_data_hash(data_csv)
Expand Down

0 comments on commit 1b0d531

Please sign in to comment.