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(server/pandas/filter): Fix datetime object comparisons TCTC-4268 #1524

Merged
merged 2 commits into from
Oct 11, 2022

Conversation

lukapeschke
Copy link
Contributor

Signed-off-by: Luka Peschke luka.peschke@toucantoco.com

@render
Copy link

render bot commented Oct 10, 2022

Copy link
Contributor

@Sanix-Darker Sanix-Darker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥 !
Some smalls none block comments left !

server/tests/steps/test_filter.py Outdated Show resolved Hide resolved
server/tests/steps/test_filter.py Outdated Show resolved Hide resolved
Comment on lines +29 to +31
else: # str
ts = Timestamp(value)
return ts if ts.tzinfo else ts.replace(tz="UTC")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else: # str
ts = Timestamp(value)
return ts if ts.tzinfo else ts.replace(tz="UTC")
# str
ts = Timestamp(value)
return ts if ts.tzinfo else ts.replace(tz="UTC")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linters prefer this, but our style in the various repos is to have an else branch even when returning in previous branches

relates to TCTC-4268

Signed-off-by: Luka Peschke <luka.peschke@toucantoco.com>
Signed-off-by: Luka Peschke <luka.peschke@toucantoco.com>
@lukapeschke lukapeschke merged commit 170b6fb into master Oct 11, 2022
@lukapeschke lukapeschke deleted the fix-filter-dates-pandas branch October 11, 2022 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants