Skip to content

Commit

Permalink
executors: add types to Zig executor
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 authored and kiritofeng committed Dec 25, 2023
1 parent 2a63298 commit 09325d4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dmoj/executors/ZIG.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import List

from dmoj.cptbox.filesystem_policies import RecursiveDir
from dmoj.executors.compiled_executor import CompiledExecutor
from dmoj.executors.mixins import StripCarriageReturnsMixin
Expand Down Expand Up @@ -29,9 +31,12 @@ class Executor(StripCarriageReturnsMixin, CompiledExecutor):
}
}"""

def get_compile_args(self):
return [self.get_command(), 'build-exe', self._code, '--release-safe', '--name', self.problem]
def get_compile_args(self) -> List[str]:
command = self.get_command()
assert command is not None
assert self._code is not None
return [command, 'build-exe', self._code, '--release-safe', '--name', self.problem]

@classmethod
def get_version_flags(cls, command):
def get_version_flags(cls, command: str) -> List[str]:
return ['version']

0 comments on commit 09325d4

Please sign in to comment.