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

Make day parser more generalizable to complex combinations of days and day ranges #6

Closed
wants to merge 1 commit into from

Conversation

nbolten
Copy link

@nbolten nbolten commented Mar 31, 2018

humanized_opening_hours currently fails when parsing day fields that have a single day and then a day range, e.g. Mo, We-Fr 10:00-17:00. This pull request is a starting point for fixing this issue, but should be taken with a grain of salt since I'm new to EBNF.

Copy link
Owner

@rezemika rezemika left a comment

Choose a reason for hiding this comment

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

Thank you for you work!

However, the unit tests do not pass anymore, can you correct them please? And can you add some in TestPatterns.test_regulars and TestParsing to test your changes?

Thank you!

@@ -22,10 +22,10 @@ def digital_moment(self, arg):
else:
time = datetime.datetime.strptime(arg[0], "%H:%M").time()
return Moment(MomentKind.NORMAL, time=time)

Copy link
Owner

Choose a reason for hiding this comment

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

I know this is a common convention, but just to remain consistent and atomic, I think unindentation of blank lines should be done later, in another PR.

@rezemika
Copy link
Owner

Ping @nbolten. ;)

@rezemika rezemika closed this Jun 5, 2018
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.

None yet

2 participants