diff --git a/hooks/__init__.py b/hooks/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 1b7d497337..ad1c29d87b 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -1,14 +1,3 @@ -""" -NOTE: - the below code is to be maintained Python 2.x-compatible - as the whole Cookiecutter Django project initialization - can potentially be run in Python 2.x environment - (at least so we presume in `pre_gen_project.py`). - -TODO: restrict Cookiecutter Django project initialization to - Python 3.x environments only -""" # noqa: INP001 - import json import os import random diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index ea7a42299c..0ab357de55 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -1,13 +1,3 @@ -""" -NOTE: - the below code is to be maintained Python 2.x-compatible - as the whole Cookiecutter Django project initialization - can potentially be run in Python 2.x environment. - -TODO: restrict Cookiecutter Django project initialization - to Python 3.x environments only -""" # noqa: INP001 - import sys TERMINATOR = "\x1b[0m" @@ -32,20 +22,6 @@ assert "\\" not in "{{ cookiecutter.author_name }}", "Don't include backslashes in author name." # noqa: PLR0133 -if "{{ cookiecutter.use_docker }}".lower() == "n": - python_major_version = sys.version_info[0] - if python_major_version == 2: # noqa: PLR2004 - yes_options, no_options = frozenset(["y"]), frozenset(["n"]) - while True: - choice = raw_input().lower() # noqa: F821 - if choice in yes_options: - break - - elif choice in no_options: - sys.exit(1) - else: - pass - if "{{ cookiecutter.use_whitenoise }}".lower() == "n" and "{{ cookiecutter.cloud_provider }}" == "None": # noqa: PLR0133 sys.exit(1) diff --git a/pyproject.toml b/pyproject.toml index 6c32e56b7d..fe6fcca99c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ docs = [ ] [tool.ruff] -target-version = "py312" +target-version = "py39" line-length = 119 # Exclude the template content as most files aren't parseable extend-exclude = [