| Conditions | 2 |
| Total Lines | 20 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from pathlib import Path |
||
| 15 | def __init__( |
||
| 16 | self, |
||
| 17 | upload_filename: str, |
||
| 18 | size_in_pixels: int, |
||
| 19 | state_of_illustrations: StateOfIllustrations, |
||
| 20 | original_file_path: Path | None = None, |
||
| 21 | ) -> None: |
||
| 22 | assert isinstance(upload_filename, str) |
||
| 23 | upload_filename = remove_wiki_unsafe_characters(upload_filename) |
||
| 24 | self.upload_filename = upload_filename |
||
| 25 | |||
| 26 | assert isinstance(size_in_pixels, int) |
||
| 27 | self.size_in_pixels = size_in_pixels |
||
| 28 | |||
| 29 | assert isinstance(state_of_illustrations, StateOfIllustrations) |
||
| 30 | self.state_of_illustrations = state_of_illustrations |
||
| 31 | |||
| 32 | if original_file_path: |
||
| 33 | assert isinstance(original_file_path, Path) |
||
| 34 | self.original_file_path = original_file_path |
||
| 35 | |||
| 46 |