Skip to content

q value handling improvements - #16

Merged
wojcikstefan merged 4 commits into
falconry:masterfrom
scop:q
May 2, 2016
Merged

wojcikstefan merged 4 commits into
falconry:masterfrom
scop:q

Conversation

@scop

@scop scop commented Apr 28, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@dbtsai

dbtsai commented Apr 28, 2016

Copy link
Copy Markdown
Collaborator

+cc @wojcikstefan Can you help to merge it? Thanks.

@wojcikstefan

Copy link
Copy Markdown
Collaborator

Yup, will look at all the PRs/issues over the weekend :)

Comment thread mimeparse.py Outdated
float(params['q']) > 1 or float(params['q']) < 0:
params.setdefault('q', params.pop('Q', None)) # q is case insensitive
try:
if not params.get('q') or not 0 <= float(params['q']) <= 1:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pretty minor, but we can use params['q'] here instead of params.get('q') because params.setdefault(...) above ensures that 'q' exists in the params dict.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PR force-updated with that change.

@wojcikstefan

Copy link
Copy Markdown
Collaborator

LGTM aside from that minor tweak!

@wojcikstefan
wojcikstefan merged commit 3cb332e into falconry:master May 2, 2016
@wojcikstefan

Copy link
Copy Markdown
Collaborator

Thank you @scop!

@scop
scop deleted the q branch May 2, 2016 14:17
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.

3 participants