Skip to content

Commit

Permalink
Update types for 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamghill committed Feb 25, 2024
1 parent 2bbdffd commit c73cf58
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django_unicorn/management/commands/startunicorn.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import webbrowser
from pathlib import Path
from typing import Dict

from django.apps import apps
from django.conf import settings
Expand Down Expand Up @@ -40,7 +41,7 @@ def add_arguments(self, parser):
parser.add_argument("app_name", type=str)
parser.add_argument("component_names", nargs="+", type=str, help="Names of components")

def check_initials_directories(self, app_directory: Path) -> (dict[str, Path], bool):
def check_initials_directories(self, app_directory: Path) -> (Dict[str, Path], bool):
"""
Checks for directories existance and creates them if necessary.
Returns a tuple containing a dictonary `components` and `templates`
Expand Down Expand Up @@ -81,7 +82,7 @@ def obtain_nested_path(self, component_name: str) -> (str, str):

return "/".join(nested_paths), component_name

def create_nested_directories(self, paths: dict[str, Path], nested_path: str) -> None:
def create_nested_directories(self, paths: Dict[str, Path], nested_path: str) -> None:
"""
Creates the nested directories for the components and templates.
"""
Expand All @@ -103,7 +104,7 @@ def create_nested_directories(self, paths: dict[str, Path], nested_path: str) ->

(component_path / "__init__.py").touch(exist_ok=True)

def create_component_and_template(self, paths: dict[str, Path], nested_path: str, component_name: str) -> None:
def create_component_and_template(self, paths: Dict[str, Path], nested_path: str, component_name: str) -> None:
"""
Creates the component and template files.
"""
Expand Down

0 comments on commit c73cf58

Please sign in to comment.