Skip to content

Commit 8338f21

Browse files
committed
Update docs in base types module.
1 parent a2c5e45 commit 8338f21

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

src/judge0/base_types.py

+24-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
@dataclass(frozen=True)
1616
class TestCase:
17-
"""Dataclass for test case."""
17+
"""Test case data model."""
1818

1919
input: Optional[str] = None
2020
expected_output: Optional[str] = None
@@ -62,6 +62,11 @@ def encode(self) -> bytes:
6262

6363

6464
class Language(BaseModel):
65+
"""Language data model.
66+
67+
Stores information about a language supported by Judge0.
68+
"""
69+
6570
id: int
6671
name: str
6772
is_archived: Optional[bool] = None
@@ -71,7 +76,12 @@ class Language(BaseModel):
7176

7277

7378
class LanguageAlias(IntEnum):
74-
"""Language enumeration."""
79+
"""Language alias enumeration.
80+
81+
Enumerates the programming languages supported by Judge0 client. Language
82+
alias is resolved to the latest version of the language supported by the
83+
selected client.
84+
"""
7585

7686
ASSEMBLY = auto()
7787
BASH = auto()
@@ -143,14 +153,20 @@ class LanguageAlias(IntEnum):
143153

144154

145155
class Flavor(IntEnum):
146-
"""Judge0 flavor enumeration."""
156+
"""Flavor enumeration.
157+
158+
Enumerates the flavors supported by Judge0 client.
159+
"""
147160

148161
CE = 0
149162
EXTRA_CE = 1
150163

151164

152165
class Status(IntEnum):
153-
"""Status enumeration."""
166+
"""Status enumeration.
167+
168+
Enumerates possible status codes of a submission.
169+
"""
154170

155171
IN_QUEUE = 1
156172
PROCESSING = 2
@@ -172,7 +188,10 @@ def __str__(self):
172188

173189

174190
class Config(BaseModel):
175-
"""Client config data."""
191+
"""Client config data model.
192+
193+
Stores configuration data for the Judge0 client.
194+
"""
176195

177196
allow_enable_network: bool
178197
allow_enable_per_process_and_thread_memory_limit: bool

0 commit comments

Comments
 (0)