We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29b6996 commit c30d2f8Copy full SHA for c30d2f8
1 file changed
app/donnees/reponse_informations.py
@@ -29,8 +29,11 @@ class ReponseInformations:
29
30
def __post_init__(self):
31
# Vérification du code de statut HTTP
32
- if not isinstance(self.code_statut_http, int):
+ if (not isinstance(self.code_statut_http, int)
33
+ or isinstance(self.code_statut_http, bool)):
34
raise TypeError("Le code de statut HTTP doit être un entier.")
35
# Vérification de la taille de la réponse (en octets)
- if self.taille_octets != None and not isinstance(self.taille_octets, int):
36
+ if (self.taille_octets != None
37
+ and not isinstance(self.taille_octets, int)
38
+ or isinstance(self.taille_octets, bool)):
39
raise TypeError("La taille en octets doit être un entier ou None.")
0 commit comments