maread99 / market_prices

Get meaningful OHLCV datasets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimum Python version to 3.10 TODO

maread99 opened this issue · comments

type annotations

  • Use of Optional and Union can now be migrated to using the | operator in the following circumstances:
    • parameter annotations of functions decorated with @valimp.parse (get_type_hints did not support the | operator prior to py 3.10). For example, Optional[Union[str, float, int]] can now be annotated as str | float | int | None.
    • creating type aliases, for example Symbols = Union[list[str], str] can now be defined as Symbols = list[str] | str
    • Indeed, search across the library for any references to Optional and Union, including with the docs, and remove / revise.
  • Should also be able to lose the from __future__ import annoations lines from the top of modules.
  • Can probably by now revert the fix implemented to accommodate bug in pandas 2.1.0 concerning treatment of origin. Intention in pandas-dev/pandas#55064 was to revert in 2.1.1. Required changes to revert fix are noted in comments on the commit.

Would be closed by #353