Skip to content

Feature/query#8

Merged
omerijaz27 merged 7 commits intotnafrom
feature/Query
Apr 29, 2021
Merged

Feature/query#8
omerijaz27 merged 7 commits intotnafrom
feature/Query

Conversation

@omerijaz27
Copy link
Copy Markdown

No description provided.

@omerijaz27 omerijaz27 requested review from Leeeebs, mdncs and omgoo April 28, 2021 16:23
Copy link
Copy Markdown

@mdncs mdncs left a comment

Choose a reason for hiding this comment

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

Approved with a couple suggestions!

Comment thread pywb/apps/rewriterapp.py Outdated
Comment on lines +826 to +835
# fields = t.split(b' ')
# if len(fields) > 14:
# fields = fields[:-2]
# for i in CDXObject().CDX_FORMATS:
# if len(i) == len(fields):
# cdxformat = i
#
# if not cdxformat:
# msg = f'unknown {len(fields)}-field cdx format: {fields}'
# raise CDXException(msg)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we still need this? Generally we'd remove code that's commented out.

Comment on lines +272 to +277
choices = {
'1': 'Jan', '2': 'Feb', '3': 'Mar',
'4': 'Apr', '5': 'May', '6': 'Jun',
'7': 'Jul', '8': 'Aug', '9': 'Sep',
'10': 'Oct', '11': 'Nov', '12': 'Dec'
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No biggie but we could generate these dynamically and avoid hard-coded values:

>>> import datetime
>>>
>>> choices = {i: datetime.date(2008, i, 1).strftime('%b') for i in range(1, 13)}
>>> choices
{1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec'}

@omerijaz27 omerijaz27 merged commit fdb6118 into tna Apr 29, 2021
@omgoo omgoo deleted the feature/Query branch May 21, 2021 09:18
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.

4 participants