Skip to content

Commit cd1f351

Browse files
committed
added explanation for Literal import try except block
1 parent cd5964b commit cd1f351

File tree

1 file changed

+2
-0
lines changed
  • {{cookiecutter.project_name}}/app/core

1 file changed

+2
-0
lines changed

{{cookiecutter.project_name}}/app/core/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
import toml
2626
from pydantic import AnyHttpUrl, AnyUrl, BaseSettings, EmailStr, validator
2727

28+
# Literal from typing_extensions for python 3.6 and 3.7 support, remove if not needed
2829
try:
2930
from typing import Literal
3031
except ImportError:
3132
from typing_extensions import Literal
33+
#
3234

3335
PROJECT_DIR = Path(__file__).parent.parent.parent
3436
pyproject_content = toml.load(f"{PROJECT_DIR}/pyproject.toml")["tool"]["poetry"]

0 commit comments

Comments
 (0)