Skip to content

Use get_list consistently - #1119

Merged
lovelydinosaur merged 4 commits into
masterfrom
use-get-list-throughout
Aug 2, 2020
Merged

Use get_list consistently#1119
lovelydinosaur merged 4 commits into
masterfrom
use-get-list-throughout

Conversation

@lovelydinosaur

Copy link
Copy Markdown
Member

Pulled through from a nice catch in #1118

I'd assumed that we ought to pragma: nocover these cases, rather than test them, but on a second look this does seem to be the pragmatic option, so let's just roll with it.

Thanks to @j178 for this!

@lovelydinosaurlovelydinosaur added the refactor Issues and PRs related to code refactoring label Aug 2, 2020
@lovelydinosaurlovelydinosaur added this to the v0.14 milestone Aug 2, 2020

@florimondmancaflorimondmanca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, a tiny suggestion!

Comment threadtests/models/test_headers.py Outdated
assert h["a"] == "123, 456"
assert h.get("a") == "123, 456"
assert h.get("nope", default=None) is None
assert h.getlist("a") == ["123", "456"]

@florimondmancaflorimondmancaAug 2, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want a with pytest.warns(DeprecatedWarning) here and in test_params(), so that these known warnings don't show up in the pytest output?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

💯 - Yes, thanks! Which helped catch that they needed to be DeprecationWarning in line with everything else (not PendingDeprecationWarning).

j178
j178 approved these changes Aug 2, 2020
@lovelydinosaur
lovelydinosaur merged commit e5f8743 into masterAug 2, 2020
@lovelydinosaur
lovelydinosaur deleted the use-get-list-throughout branch August 2, 2020 10:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactorIssues and PRs related to code refactoring

Development

Successfully merging this pull request may close these issues.

3 participants

@lovelydinosaur@j178@florimondmanca