From d81d9d5b9cbee4f6c30699a3ccdaa83bc98a2a62 Mon Sep 17 00:00:00 2001 From: "dlrsp-actions[bot]" <293736084+dlrsp-actions[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 14:12:38 +0000 Subject: [PATCH 1/2] Automated dependency upgrades --- requirements/py310-django42.txt | 2 +- requirements/py310-django52.txt | 2 +- requirements/py311-django42.txt | 2 +- requirements/py311-django52.txt | 2 +- requirements/py312-django42.txt | 2 +- requirements/py312-django52.txt | 2 +- requirements/py313-django52.txt | 2 +- requirements/py314-django52.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements/py310-django42.txt b/requirements/py310-django42.txt index 42e6ec09..d4c415b4 100644 --- a/requirements/py310-django42.txt +++ b/requirements/py310-django42.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py310-django42.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py310-django42.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ diff --git a/requirements/py310-django52.txt b/requirements/py310-django52.txt index cde4edfa..ef1fb67b 100644 --- a/requirements/py310-django52.txt +++ b/requirements/py310-django52.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py310-django52.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py310-django52.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ diff --git a/requirements/py311-django42.txt b/requirements/py311-django42.txt index 3597aed2..12472b54 100644 --- a/requirements/py311-django42.txt +++ b/requirements/py311-django42.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py311-django42.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py311-django42.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ diff --git a/requirements/py311-django52.txt b/requirements/py311-django52.txt index 1f6242e9..765616e9 100644 --- a/requirements/py311-django52.txt +++ b/requirements/py311-django52.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py311-django52.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py311-django52.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ diff --git a/requirements/py312-django42.txt b/requirements/py312-django42.txt index 914a2bbd..f48c0522 100644 --- a/requirements/py312-django42.txt +++ b/requirements/py312-django42.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py312-django42.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py312-django42.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ diff --git a/requirements/py312-django52.txt b/requirements/py312-django52.txt index a7a0e0c8..d919058f 100644 --- a/requirements/py312-django52.txt +++ b/requirements/py312-django52.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py312-django52.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py312-django52.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ diff --git a/requirements/py313-django52.txt b/requirements/py313-django52.txt index 0d384bb7..63ec701a 100644 --- a/requirements/py313-django52.txt +++ b/requirements/py313-django52.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.13 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py313-django52.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py313-django52.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ diff --git a/requirements/py314-django52.txt b/requirements/py314-django52.txt index 432e0724..6fa82665 100644 --- a/requirements/py314-django52.txt +++ b/requirements/py314-django52.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.14 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/py314-django52.txt requirements/runtime.in +# pip-compile --allow-unsafe --generate-hashes --no-index --output-file=requirements/py314-django52.txt requirements/runtime.in # asgiref==3.12.1 \ --hash=sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340 \ From cf417235dbbcef6e7a694d1a247a806020b762ed Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 14:12:51 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/django_errors/mail_identity.py | 52 +++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/src/django_errors/mail_identity.py b/src/django_errors/mail_identity.py index 5cc380fa..b4866461 100644 --- a/src/django_errors/mail_identity.py +++ b/src/django_errors/mail_identity.py @@ -39,23 +39,43 @@ def _read_env_file(path: str | Path) -> dict[str, str]: def identity_tag( *, - scope: Optional[str] = None, - role: Optional[str] = None, - hostname: Optional[str] = None, - install_tag: Optional[str] = None, + scope: str | None = None, + role: str | None = None, + hostname: str | None = None, + install_tag: str | None = None, env_file: str | Path = _DEFAULT_ENV_FILE, - environ: Optional[Mapping[str, str]] = None, + environ: Mapping[str, str] | None = None, ) -> str: """Return the compact identity tag for this host.""" env = environ if environ is not None else os.environ file_vars = _read_env_file(env_file) - cached = (env.get("SH_MAIL_IDENTITY_TAG") or file_vars.get("SH_MAIL_IDENTITY_TAG") or "").strip() - if cached and scope is None and role is None and hostname is None and install_tag is None: + cached = ( + env.get("SH_MAIL_IDENTITY_TAG") + or file_vars.get("SH_MAIL_IDENTITY_TAG") + or "" + ).strip() + if ( + cached + and scope is None + and role is None + and hostname is None + and install_tag is None + ): return cached - scope_v = (scope or env.get("SH_OS_Scope") or file_vars.get("SH_OS_Scope") or "unknown").strip() - role_v = (role or env.get("SH_Host_Role") or file_vars.get("SH_Host_Role") or "unknown").strip() + scope_v = ( + scope + or env.get("SH_OS_Scope") + or file_vars.get("SH_OS_Scope") + or "unknown" + ).strip() + role_v = ( + role + or env.get("SH_Host_Role") + or file_vars.get("SH_Host_Role") + or "unknown" + ).strip() host_v = ( hostname or env.get("SH_OS_HostName") @@ -65,7 +85,11 @@ def identity_tag( install_v = ( install_tag if install_tag is not None - else (env.get("SH_Mail_InstallTag") or file_vars.get("SH_Mail_InstallTag") or "") + else ( + env.get("SH_Mail_InstallTag") + or file_vars.get("SH_Mail_InstallTag") + or "" + ) ).strip() if scope_v == "PROD" and role_v in _PROD_COMPACT_ROLES: @@ -80,13 +104,17 @@ def identity_tag( def subject_prefix( kind: str = "app", *, - environ: Optional[Mapping[str, str]] = None, + environ: Mapping[str, str] | None = None, env_file: str | Path = _DEFAULT_ENV_FILE, ) -> str: """Return ``[kind]`` with trailing space (Django EMAIL_SUBJECT_PREFIX).""" env = environ if environ is not None else os.environ file_vars = _read_env_file(env_file) - explicit = (env.get("EMAIL_SUBJECT_PREFIX") or file_vars.get("EMAIL_SUBJECT_PREFIX") or "").rstrip() + explicit = ( + env.get("EMAIL_SUBJECT_PREFIX") + or file_vars.get("EMAIL_SUBJECT_PREFIX") + or "" + ).rstrip() if explicit and kind == "app": return f"{explicit} " if not explicit.endswith(" ") else explicit return f"[{kind}]{identity_tag(environ=env, env_file=env_file)} "