From 3bd27840e177bd97090a6012e1c251f07d2243e7 Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Wed, 2 Apr 2025 16:03:27 +0300 Subject: [PATCH] =?UTF-8?q?[+]=20AnixartApiErrors=20[+]=20=D0=9E=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=BB=D1=8F=20Ani?= =?UTF-8?q?xartAPIError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- anixart/auth/erros.py | 7 ------- anixart/enums.py | 4 ++++ anixart/exceptions.py | 4 +++- 3 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 anixart/auth/erros.py diff --git a/anixart/auth/erros.py b/anixart/auth/erros.py deleted file mode 100644 index 670357a..0000000 --- a/anixart/auth/erros.py +++ /dev/null @@ -1,7 +0,0 @@ -from enum import IntEnum - - -class AnixartAuthError(IntEnum): - """ Error codes for AnixartApi authentication.""" - INCORRECT_LOGIN = 1 - INCORRECT_PASSWORD = 2 diff --git a/anixart/enums.py b/anixart/enums.py index 190c7cb..3c1092d 100644 --- a/anixart/enums.py +++ b/anixart/enums.py @@ -1,5 +1,9 @@ from enum import IntEnum +class AnixartApiErrors(IntEnum): + """ Error codes for AnixartApi authentication.""" + INCORRECT_LOGIN = 1 + INCORRECT_PASSWORD = 2 class AnixartComment(IntEnum): DISLIKE = 1 diff --git a/anixart/exceptions.py b/anixart/exceptions.py index d9b0c2e..7b6d977 100644 --- a/anixart/exceptions.py +++ b/anixart/exceptions.py @@ -7,7 +7,9 @@ class AnixartBasError(Exception): ... class AnixartInitError(AnixartBasError, TypeError): ... # API errors -class AnixartAPIError(AnixartBasError): ... +class AnixartAPIError(AnixartBasError): + message = "unknown error" + code = 0 class AnixartAuthError(AnixartAPIError): ...