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

Bug 1760933: return a str from get_phab_server_callsign #20

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

cgsheeh
Copy link
Member

@cgsheeh cgsheeh commented Mar 24, 2022

We had incorrect type annotations on both callsign
fetching functions, so changing one function to actually
return str resulted in inconsistent types when comparing
otherwise identical strings. Stop encoding the value of
get_phab_server_callsign and only encode to bytes once
we need to send the string off to Mercurial.

Also use a different variable name for the encoded JSON
params to avoid changing the type from dict and yielding
a warning from linters.

We had incorrect type annotations on both callsign
fetching functions, so changing one function to actually
return `str` resulted in inconsistent types when comparing
otherwise identical strings. Stop encoding the value of
`get_phab_server_callsign` and only encode to `bytes` once
we need to send the string off to Mercurial.

Also use a different variable name for the encoded JSON
`params` to avoid changing the type from `dict` and yielding
a warning from linters.
@cgsheeh cgsheeh requested a review from zzzeid March 24, 2022 14:03
@cgsheeh
Copy link
Member Author

cgsheeh commented Mar 24, 2022

Tested in suite and a revision in the same repo is left without a modified commit message, differential revision correctly closed.

@cgsheeh cgsheeh merged commit 39ae51b into mozilla-conduit:master Mar 24, 2022
@cgsheeh cgsheeh deleted the differentiator-bytes branch March 24, 2022 14: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.

2 participants