flake8
-
reviewboard/notifications/webhooks.py (Diff revision 1)
Review Request #10348 — Created Dec. 5, 2018 and submitted
A recent change fixed several type-related issues in WebHook payloads,
butstr
types for keys were still problematic. This change addresses
this, and at the same time prevents future issues with subclasses of
primitive types,OrderedDict
s, and byte strings containing Unicode
content. It also keeps order preserved for dictionaries, which helps
with consistent payloads (useful for testing).
Unit tests pass.
Fixed an alignment issue.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+83 -24) |
reviewboard/notifications/webhooks.py (Diff revision 2) |
---|
I feel this warrants a comment because I don't know the interaction here between calling `six.text_type` on the result of `force_text`.
Split off handling of
bytes
fromSafeText
so logic is more clear.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+85 -24) |