Skip to content

Commit 5151027

Browse files
committed
Add flavor's as standalone constants to init.
1 parent b7964b7 commit 5151027

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/0002_hello_world.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import judge0
2-
from judge0 import Flavor
32

43
submission = judge0.Submission(
54
source_code="print('Hello Judge0')",
65
language_id=25,
76
)
87

98
# Instead of relying on the CE flavor of judge0, we can use EXTRA_CE.
10-
judge0.run(client=Flavor.EXTRA_CE, submissions=submission)
9+
judge0.run(client=judge0.EXTRA_CE, submissions=submission)
1110

1211
print(submission.stdout)

src/judge0/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,6 @@ def _create_default_client(
8585
JUDGE0_IMPLICIT_EXTRA_CE_CLIENT = _create_default_client(
8686
Flavor.EXTRA_CE, SuluJudge0ExtraCE
8787
)
88+
89+
CE = Flavor.CE
90+
EXTRA_CE = Flavor.EXTRA_CE

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy