From 86e5d2dfc73c786b4d9eadc828becbccb8f625d8 Mon Sep 17 00:00:00 2001
From: DAVID Axel <axel.david@etu.univ-amu.fr>
Date: Wed, 3 May 2023 08:05:48 +0200
Subject: [PATCH] docs: :memo: Document init method of error.

---
 src/vigenere_api/version/errors.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/vigenere_api/version/errors.py b/src/vigenere_api/version/errors.py
index aea4044..a416b29 100644
--- a/src/vigenere_api/version/errors.py
+++ b/src/vigenere_api/version/errors.py
@@ -75,6 +75,7 @@ class InvalidElementValueError(ValueError):
     """Thrown if an element in the version is less than 0."""
 
     def __init__(self, element: int, element_type: Element) -> None:
+        """Create an InvalidElementValueError from the element and element_type."""
         super().__init__(
             f"The {element_type} is equal to '{element}'."
             + " Please give an integer greater or equal to zero.",
@@ -86,6 +87,7 @@ class InvalidMajorValueError(InvalidElementValueError):
     """Thrown if 'major' is less than 0."""
 
     def __init__(self, major: int) -> None:
+        """Create an InvalidMajorValueError from the major."""
         super().__init__(major, Element.MAJOR)
 
 
@@ -94,6 +96,7 @@ class InvalidMinorValueError(InvalidElementValueError):
     """Thrown if 'minor' is less than 0."""
 
     def __init__(self, minor: int) -> None:
+        """Create an InvalidMinorValueError from the minor."""
         super().__init__(minor, Element.MINOR)
 
 
@@ -102,4 +105,5 @@ class InvalidPatchValueError(InvalidElementValueError):
     """Thrown if 'patch' is less than 0."""
 
     def __init__(self, patch: int) -> None:
+        """Create an InvalidPatchValueError from the patch."""
         super().__init__(patch, Element.PATCH)
-- 
GitLab