Skip to content

Commit 8e6ca1a

Browse files
add docstring to some exceptions
Signed-off-by: thiswillbeyourgithub <[email protected]>
1 parent 39af223 commit 8e6ca1a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

wdoc/utils/errors.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,24 @@ def __init__(self) -> None:
3636

3737

3838
class FrozenAttributeCantBeSet(AttributeError):
39+
"""
40+
The attributes of EnvDataclass are frozen on purpose
41+
to avoid race condition as accessing an attribute loads
42+
the value dynamically from the environment.
43+
"""
44+
3945
def __init__(self, name, value) -> None:
4046
super().__init__(
4147
f"Attribute of the wdoc env instance should not be set manually, instead modify os.environ. Attribute name was '{name}'. Value was '{value}'"
4248
)
4349

4450

4551
class NoInferrableFiletype(Exception):
52+
"""
53+
Occurs when the 'filetype' argument of a file
54+
was left by the user to 'auto' but wdoc failed to
55+
find the appropriate loader for it.
56+
"""
57+
4658
def __init__(self, message: str) -> None:
4759
super().__init__(message)

0 commit comments

Comments
 (0)