Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Consistency in datetime #615

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

Closed
2 tasks
alallema opened this issue Dec 7, 2022 · 3 comments Β· Fixed by #661
Closed
2 tasks

Consistency in datetime #615

alallema opened this issue Dec 7, 2022 · 3 comments Β· Fixed by #661
Labels
good first issue Good for newcomers maintenance Anything related to maintenance (CI, tests, refactoring...)

Comments

@alallema
Copy link
Contributor

alallema commented Dec 7, 2022

Description
Currently, not all dates are typed in datetime like it the case in the index class

        created_at: datetime | str | None = None,

datetime should be used for every date in this SDK

Basic example
All the dates in Task class should be defined as:

    enqueued_at: datetime | str,

or

    enqueued_at: datetime,

To Do:

  • Check types wherever dates are used
  • Adapt tests if needed
@alallema alallema added good first issue Good for newcomers maintenance Anything related to maintenance (CI, tests, refactoring...) labels Dec 7, 2022
@sanders41
Copy link
Collaborator

Specifically in the Task and TaskInfo classes datetime | str won't work. It would need to be `Union[datetime, str]. See this comment for an explanation as to why.

@Azanul
Copy link
Contributor

Azanul commented Jan 23, 2023

@alallema @sanders41 Please check the PR, let me know if I'm on the right path. Will continue changes upon confirmation.

@alallema
Copy link
Contributor Author

Hi @Azanul,
Thanks for all this PR and contribution ❀️. I'm in training this week, so I'll try to check it all out as soon as possible during the week if I can.

@bors bors bot closed this as completed in ce9f60e Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers maintenance Anything related to maintenance (CI, tests, refactoring...)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants