1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Python 3 annotations, super(), pathlib, etc.

This commit is contained in:
Jakub Roztocil
2019-08-30 11:32:14 +02:00
parent 63df735fef
commit 0f654388fc
23 changed files with 229 additions and 196 deletions

View File

@@ -2,12 +2,15 @@
HTTPie - a CLI, cURL-like tool for humans.
"""
from enum import Enum
__version__ = '2.0.0-dev'
__author__ = 'Jakub Roztocil'
__licence__ = 'BSD'
class ExitStatus:
class ExitStatus(Enum):
"""Program exit code constants."""
SUCCESS = 0
ERROR = 1
@@ -23,10 +26,3 @@ class ExitStatus:
ERROR_HTTP_3XX = 3
ERROR_HTTP_4XX = 4
ERROR_HTTP_5XX = 5
EXIT_STATUS_LABELS = {
value: key
for key, value in ExitStatus.__dict__.items()
if key.isupper()
}