11import os
22import webbrowser
33from pathlib import Path
4+ from typing import Dict
45
56from django .apps import apps
67from django .conf import settings
@@ -40,7 +41,7 @@ def add_arguments(self, parser):
4041 parser .add_argument ("app_name" , type = str )
4142 parser .add_argument ("component_names" , nargs = "+" , type = str , help = "Names of components" )
4243
43- def check_initials_directories (self , app_directory : Path ) -> (dict [str , Path ], bool ):
44+ def check_initials_directories (self , app_directory : Path ) -> (Dict [str , Path ], bool ):
4445 """
4546 Checks for directories existance and creates them if necessary.
4647 Returns a tuple containing a dictonary `components` and `templates`
@@ -81,7 +82,7 @@ def obtain_nested_path(self, component_name: str) -> (str, str):
8182
8283 return "/" .join (nested_paths ), component_name
8384
84- def create_nested_directories (self , paths : dict [str , Path ], nested_path : str ) -> None :
85+ def create_nested_directories (self , paths : Dict [str , Path ], nested_path : str ) -> None :
8586 """
8687 Creates the nested directories for the components and templates.
8788 """
@@ -103,7 +104,7 @@ def create_nested_directories(self, paths: dict[str, Path], nested_path: str) ->
103104
104105 (component_path / "__init__.py" ).touch (exist_ok = True )
105106
106- def create_component_and_template (self , paths : dict [str , Path ], nested_path : str , component_name : str ) -> None :
107+ def create_component_and_template (self , paths : Dict [str , Path ], nested_path : str , component_name : str ) -> None :
107108 """
108109 Creates the component and template files.
109110 """
0 commit comments