Commit db6f7700 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

assert files are str

parent 86d62717
Pipeline #2298 failed with stage
...@@ -44,13 +44,15 @@ class CsstResult: ...@@ -44,13 +44,15 @@ class CsstResult:
def __init__( def __init__(
self, self,
status: CsstStatus = CsstStatus.ERROR, status: CsstStatus = CsstStatus.ERROR,
files: Optional[list] = None, files: Optional[list[str]] = None,
**output: Any, **output: Any,
): ):
if files is None: if files is None:
files = [] files = []
assert isinstance(status, CsstStatus) assert isinstance(status, CsstStatus)
assert type(files) is list assert isinstance(files, list)
for _ in files:
assert isinstance(_, str)
self.status: CsstStatus = status self.status: CsstStatus = status
self.files: Optional[list] = files self.files: Optional[list] = files
self.output: dict = output self.output: dict = output
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment