isik-kaplan/django-http-exceptions

Some raw exception variables are mistyped

realsuayip opened this issue · 3 comments

i.e., 102, 206, 307, 308, 402, 407, 417, 429

Hello!

Not quite sure what you mean by "mistyped", all the variable names are from http built-in library

>>> from http import HTTPStatus
>>> HTTPStatus.PROCESSING
<HTTPStatus.PROCESSING: 102>
>>> 

Can you elaborate please?

I'm suggesting the ones that are listed on the file _exceptions.py that are (I suspect) meant to be used without requiring a namespace.

Oh! I saw them, some of them are missing the first couple of letters, I should've just generated them, first thing I did was to add them to global namespace programmatically. Which caused linters to set my IDE on fire. Then I switched to manually adding them to _exceptions.py.

I'll fix the ones you mentioned and any other that I find manually for now, and I'll probably add the generation to CI/CD for less error prone behavior for the future.

Thanks for reporting! Will close the issue when I release a patch version.