data.UMLFile

 1from .SourceFile import SourceFile
 2
 3
 4class UMLFile:
 5    """
 6    Data class representing a PlantUML file.
 7    """
 8
 9    def __init__(self, source_files: list[SourceFile]) -> None:
10        self.source_files: list[SourceFile] = source_files
11
12    def __str__(self) -> str:
13        file: str = '@startuml\n' + \
14            'left to right direction\n' + \
15            'skinparam packageStyle frame\n' + \
16            'skinparam packageBorderColor gray\n' + \
17            'skinparam classBackgroundColor white\n' + \
18            'skinparam objectBackgroundColor white\n' + \
19            'hide empty members\n' + \
20            'hide circle\n' + \
21            '\n'.join([
22                str(source_file)
23                for source_file in self.source_files
24            ]) + \
25            '\n' + \
26            '\n'.join([
27                source_file.get_connection_strings()
28                for source_file in self.source_files
29            ]) + \
30            '\n@enduml'
31        return '\n'.join([line for line in file.split('\n') if line.strip()])
class UMLFile:
 5class UMLFile:
 6    """
 7    Data class representing a PlantUML file.
 8    """
 9
10    def __init__(self, source_files: list[SourceFile]) -> None:
11        self.source_files: list[SourceFile] = source_files
12
13    def __str__(self) -> str:
14        file: str = '@startuml\n' + \
15            'left to right direction\n' + \
16            'skinparam packageStyle frame\n' + \
17            'skinparam packageBorderColor gray\n' + \
18            'skinparam classBackgroundColor white\n' + \
19            'skinparam objectBackgroundColor white\n' + \
20            'hide empty members\n' + \
21            'hide circle\n' + \
22            '\n'.join([
23                str(source_file)
24                for source_file in self.source_files
25            ]) + \
26            '\n' + \
27            '\n'.join([
28                source_file.get_connection_strings()
29                for source_file in self.source_files
30            ]) + \
31            '\n@enduml'
32        return '\n'.join([line for line in file.split('\n') if line.strip()])

Data class representing a PlantUML file.

UMLFile(source_files: list[data.SourceFile.SourceFile])
10    def __init__(self, source_files: list[SourceFile]) -> None:
11        self.source_files: list[SourceFile] = source_files
source_files: list[data.SourceFile.SourceFile]