Use 200 instead of requests.codes.ok
ClosedPublic

Authored by demon on May 4 2018, 2:06 AM.

Details

Reviewers
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rMSCAad1d5b45f224: Use 200 instead of requests.codes.ok
Patch without arc
git checkout -b D1044 && curl -L https://phabricator.wikimedia.org/D1044?download=true | git apply
Summary

While this /works/ at runtime, it annoys the crap out of static analysis tools. We know what HTTP status code 200 is

Diff Detail

Repository
rMSCA Scap
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
demon created this revision.May 4 2018, 2:06 AM
Restricted Application added a reviewer: mmodell. · View Herald TranscriptMay 4 2018, 2:06 AM
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald Transcript
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
demon requested review of this revision.May 4 2018, 2:08 AM
mmodell accepted this revision.May 4 2018, 7:31 PM
This revision is now accepted and ready to land.May 4 2018, 7:31 PM

Future versions of requests probably won't (but totally could) change this from an int to a string or and object or something else to fit their future development needs. Don't think this is necessary.

demon added a comment.May 4 2018, 8:07 PM

I'll could tell pylint to skip it instead I suppose

This revision was automatically updated to reflect the committed changes.
demon added a comment.May 4 2018, 8:09 PM

I had already started the land before I saw your comment...I did a straight revert in master w/o a diff.