Skip to content

Commit

Permalink
Correct last_update_time type hint (#1573)
Browse files Browse the repository at this point in the history
#### What does this implement or fix?

`SymbolDescription.last_update_time` is a
`pandas._libs.tslibs.timestamps.Timestamp` which is a
`datetime.datetime` subtype, not a `numpy.datetime64`.

#### Any other comments?

Should this be `Union[datetime.datetime, numpy.datetime64]`?

#### Checklist

<details>
  <summary>
   Checklist for code changes...
  </summary>
 
- [ ] Have you updated the relevant docstrings, documentation and
copyright notice?
- [ ] Is this contribution tested against [all ArcticDB's
features](../docs/mkdocs/docs/technical/contributing.md)?
- [ ] Do all exceptions introduced raise appropriate [error
messages](https://docs.arcticdb.io/error_messages/)?
 - [ ] Are API changes highlighted in the PR description?
- [ ] Is the PR labelled as enhancement or bug so it appears in
autogenerated release notes?
</details>

<!--
Thanks for contributing a Pull Request to ArcticDB! Please ensure you
have taken a look at:
- ArcticDB's Code of Conduct:
https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md
- ArcticDB's Contribution Licensing:
https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing
-->
  • Loading branch information
jamesmunro committed May 17, 2024
1 parent b0f953c commit cd632fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/arcticdb/version_store/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class SymbolDescription(NamedTuple):
Whether the index is a simple index or a multi_index. ``NA`` indicates that the stored data does not have an index.
row_count : int
Number of rows.
last_update_time : datetime64
last_update_time : datetime.datetime
The time of the last update to the symbol, in UTC.
date_range : Tuple[Union[datetime.datetime, numpy.datetime64], Union[datetime.datetime, numpy.datetime64]]
The values of the index column in the first and last rows of this symbol in UTC. Both values will be NaT if:
Expand All @@ -145,7 +145,7 @@ class SymbolDescription(NamedTuple):
index: NameWithDType
index_type: str
row_count: int
last_update_time: datetime64
last_update_time: datetime.datetime
date_range: Tuple[Union[datetime.datetime, datetime64], Union[datetime.datetime, datetime64]]
sorted: str

Expand Down

0 comments on commit cd632fc

Please sign in to comment.