Skip to content

Import DateSpan from its module in DateSpanSet.to_span - #116

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/datespanset-to-span
Nov 14, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/datespanset-to-span

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

DateSpanSet.to_span imports DateSpan from pymeos/collections/time/datespan.py, the module defining it, and answers the DateSpan of the span set.

Why. to_span imported DateSpan from .dateset, which defines DateSet alone, so every call raised ImportError: cannot import name 'DateSpan' from 'pymeos.collections.time.dateset'.

Measured. On PyMEOS master 622ccd1, DateSpanSet("{[2019-09-08, 2019-09-10], [2019-09-12, 2019-09-14]}").to_span() raises that ImportError; this change answers DateSpan("[2019-09-08, 2019-09-14]").

Witness. tests/collections/time/datespanset_test.py gains test_to_span, beside the test_to_span of dateset_test.py, and passes; ruff check and ruff format pass.

DateSpanSet.to_span imports DateSpan from pymeos/collections/time/datespan.py, the module defining it, and answers the DateSpan of the span set.

Why. to_span imported DateSpan from .dateset, which defines DateSet alone, so every call raised ImportError: cannot import name 'DateSpan' from 'pymeos.collections.time.dateset'.

Measured. On PyMEOS master 622ccd1, DateSpanSet("{[2019-09-08, 2019-09-10], [2019-09-12, 2019-09-14]}").to_span() raises that ImportError; this change answers DateSpan("[2019-09-08, 2019-09-14]").

Witness. tests/collections/time/datespanset_test.py gains test_to_span, beside the test_to_span of dateset_test.py, and passes; ruff check and ruff format pass.
@estebanzimanyi
estebanzimanyi force-pushed the fix/datespanset-to-span branch from ef8ad44 to b52eb8a Compare November 14, 2026 08:24
@estebanzimanyi
estebanzimanyi merged commit 3371776 into MobilityDB:master Nov 14, 2026
8 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/datespanset-to-span branch November 14, 2026 08:59
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.

1 participant