chore: nicer tracebacks and dev improvements #1258
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This could be a hindrance to moving to static configuration, and isn't that useful or that great of an idea (the more deps in one environment, the more fragile it is). Let's just remove it.
We already require PyGitHub, and that's fully typed, so let's just use that. Also cleaned up this script (not sure if we really need it, but let's keep it nice as long as we have it).
I wrote a flake8 check and description for this here: https://github.com/henryiii/flake8-errmsg. I'm not adding the check at the moment, just cleaning up the existing exceptions. I improved the text of a few exceptions, too. I think we shouldn't throw raw
Exception
s, but should at least doRuntimeError
, but I didn't change any exception types. Edit: it now supports setting a length if you'd rather not do this for very short messages. But I think it's fine to be consistent).