(
self,
index=None, # type: Optional[str]
find_links=None, # type: Optional[str]
tmpdir=None, # type: Optional[Tempdir]
)
| 293 | id_suffix = attr.ib(default="") # type: str |
| 294 | |
| 295 | def extra_args( |
| 296 | self, |
| 297 | index=None, # type: Optional[str] |
| 298 | find_links=None, # type: Optional[str] |
| 299 | tmpdir=None, # type: Optional[Tempdir] |
| 300 | ): |
| 301 | # type: (...) -> List[str] |
| 302 | |
| 303 | format_args = {} # type: Dict[str, str] |
| 304 | if index: |
| 305 | format_args["index"] = index |
| 306 | if find_links: |
| 307 | format_args["find_links"] = find_links |
| 308 | |
| 309 | extra_args = [] # type: List[str] |
| 310 | for arg in self._extra_args: |
| 311 | if isinstance(arg, str): |
| 312 | extra_args.append(arg.format(**format_args)) |
| 313 | else: |
| 314 | assert tmpdir is not None, "tmpdir must be passed to extra_args(...)" |
| 315 | extra_args.append(arg(tmpdir)) |
| 316 | return extra_args |
| 317 | |
| 318 | def __str__(self): |
| 319 | # type: () -> str |
no test coverage detected