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: make check_date_operators work with dateutil < 2.8.1 #273

Conversation

snosratiershad
Copy link
Contributor

Description

For better discussion about #266

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests
  • Spec Tests
  • Integration tests / Manual Tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

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

Oh! That's a much nicer approach than just forcing the version. I think this looks good in principle.

The linter is definitely going to complain about the bare except here. I think that should be fixable, I think it's okay if you disable linting on that line

How do you feel about pulling that try catch up to a module level call rather than buried in the method itself?

@sighphyre sighphyre mentioned this pull request Sep 12, 2023
4 tasks
@snosratiershad
Copy link
Contributor Author

snosratiershad commented Sep 13, 2023

OK @sighphyre, if you approve this approach I'm going to fix issues with the linter, etc.
Actually, I don't feel good about the module-level idea. It can differ in case, The main reason that I used this approach is that I proved the case of raising ValueError on the method is the same with ParserError and I'm not sure about any other method and usage.

@sighphyre
Copy link
Member

@snosratiershad

Actually, I don't feel good about the module-level idea. It can differ in case, The main reason that I used this approach is that I proved the case of raising ValueError on the method is the same with ParserError and I'm not sure about any other method and usage.

Okay, that's actually an entirely fair comment, good point.

Yeah, I'm happy to merge this if the lint passes!

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

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

LGTM!

@sighphyre
Copy link
Member

@snosratiershad I see the commit! Looks good to me, are you okay for me to merge it?

@snosratiershad
Copy link
Contributor Author

@sighphyre yes, looks ready for me.

@sighphyre sighphyre merged commit 7a3b6d3 into Unleash:main Sep 18, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants