-
Notifications
You must be signed in to change notification settings - Fork 7
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 bug in FiniteDateRange.is_disjoint #112
Conversation
40f0dd3
to
844eb65
Compare
c33c82d
to
2003154
Compare
Previously if you called is_disjoint on a range containing either date.min or date.max you would get an OverflowError.
2003154
to
3bec7eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! Just please update the version to 4.8.0
. Thanks!
@@ -1,5 +1,11 @@ | |||
# Changelog | |||
|
|||
## v4.7.1 - 2023-11-01 | |||
|
|||
- Adding explicit type for Optional OneToOneField [#113](https://github.com/octoenergy/xocto/pull/113) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In semver, this is a 4.8.0 change, not 4.7.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
setup.py
Outdated
@@ -6,7 +6,7 @@ | |||
|
|||
REPO_ROOT = path.abspath(path.dirname(__file__)) | |||
|
|||
VERSION = "4.7.0" | |||
VERSION = "4.7.1" |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
xocto/__init__.py
Outdated
@@ -1 +1 @@ | |||
__version__ = "4.7.0" | |||
__version__ = "4.7.1" |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
@@ -811,11 +811,17 @@ def is_disjoint(self, other: Range[datetime.date]) -> bool: | |||
other_start = other.start | |||
if other._is_left_inclusive: | |||
assert other_start is not None | |||
other_start -= datetime.timedelta(days=1) | |||
try: | |||
other_start -= datetime.timedelta(days=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing needs to be changed here, merely a comment that I rarely see -=
. 🤷🏻
3bec7eb
to
19ea90e
Compare
Previously if you called is_disjoint on a range containing either
date.min or date.max you would get an OverflowError.