Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX+ENH: Time conversions for CSV parser and HTML table parser #2329

Merged
merged 1 commit into from
May 19, 2023

Commits on May 18, 2023

  1. ENH+FIX: This commit:

    * Adds new `TimeFormat` class for `time_format` bot parameter. It improves performance, as it validates the parameter only once on instantiation of the bot class and not every time datetime is parsed (looking at you HTML Table parser). Also removes some code duplicity.
    * Changes CSV Parser time conversions. For some reason the CSV parser had it's own `TIME_CONVERSIONS` and it was very limited. This PR changes it to use `DateTime.TIME_CONVERSIONS`. Now CSV parser uses `TimeFormat` class for `time_format` parameter.
    * Changes HTML Table parser to use `TimeFormat` class for `time_format` parameter as well.
    * Changes `DateTime` conversion function names to consistent naming scheme starting with `from_`. Changes function signature to be consistent. Backwards compatible.
    * Updates some docstrings.
    * Fixes a bug in `InvalidArgument` exception.
    gethvi committed May 18, 2023
    Configuration menu
    Copy the full SHA
    6190bc0 View commit details
    Browse the repository at this point in the history