Lines Matching refs:self
39 def __init__(self, description: Optional[str] = None): argument
40 self.comments = [] #type: List[str]
41 self.description = description #type: Optional[str]
42 self.dependencies = [] #type: List[str]
43 self.function = None #type: Optional[str]
44 self.arguments = [] #type: List[str]
46 def add_comment(self, *lines: str) -> None: argument
47 self.comments += lines
49 def set_description(self, description: str) -> None: argument
50 self.description = description
52 def set_dependencies(self, dependencies: List[str]) -> None: argument
53 self.dependencies = dependencies
55 def set_function(self, function: str) -> None: argument
56 self.function = function
58 def set_arguments(self, arguments: List[str]) -> None: argument
59 self.arguments = arguments
61 def check_completeness(self) -> None: argument
62 if self.description is None:
64 if self.function is None:
67 def write(self, out: typing_util.Writable) -> None: argument
75 self.check_completeness()
76 assert self.description is not None # guide mypy
77 assert self.function is not None # guide mypy
79 for line in self.comments:
81 out.write(self.description + '\n')
82 if self.dependencies:
83 out.write('depends_on:' + ':'.join(self.dependencies) + '\n')
84 out.write(self.function + ':' + ':'.join(self.arguments) + '\n')