-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.py
More file actions
65 lines (51 loc) · 1.94 KB
/
interface.py
File metadata and controls
65 lines (51 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from abc import ABC, abstractmethod
from enum import StrEnum
class EDispatchersTypes(StrEnum):
BY_FILE_EXT = "by_file_ext"
BY_FILE_TYPE = "by_file_type"
BY_GLOB = "by_glob"
class IConfig(ABC):
@abstractmethod
def get_by_file_ext(self) -> dict[str, str]:
"""Gets config for file extension-based dispatching"""
raise NotImplementedError
@abstractmethod
def get_by_file_type(self) -> dict[str, str]:
"""Gets config for file type-based dispatching"""
raise NotImplementedError
@abstractmethod
def get_by_glob(self) -> dict[str, str]:
"""Gets config for glob pattern-based dispatching"""
raise NotImplementedError
@abstractmethod
def get_dispatchers_order(self) -> list[EDispatchersTypes]:
"""Gets the priority order of dispatchers"""
raise NotImplementedError
@abstractmethod
def get_coderunner_tempfile_prefix(self) -> str:
"""Gets the prefix for coderunner temporary files"""
raise NotImplementedError
@abstractmethod
def get_executor(self) -> str:
"""Gets the command executor"""
raise NotImplementedError
@abstractmethod
def get_ignore_selection(self) -> bool:
"""Gets the flag for ignoring selection"""
raise NotImplementedError
@abstractmethod
def get_respect_shebang(self) -> bool:
"""Gets the flag for respecting shebang"""
raise NotImplementedError
@abstractmethod
def get_remove_coderunner_tempfiles_on_exit(self) -> bool:
"""Gets the flag for removing temporary files on exit"""
raise NotImplementedError
@abstractmethod
def get_save_all_files_before_run(self) -> bool:
"""Gets the flag for saving all files before run"""
raise NotImplementedError
@abstractmethod
def get_save_file_before_run(self) -> bool:
"""Gets the flag for saving current file before run"""
raise NotImplementedError