From 17288dd5d6a3e86a45214553419e5289f81f7fe9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:39:21 +0000 Subject: [PATCH 1/2] chore(deps): bump gitpython from 3.1.50 to 3.1.58 in /requirements Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.50 to 3.1.58. - [Release notes](https://github.com/gitpython-developers/GitPython/releases) - [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES) - [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.50...3.1.58) --- updated-dependencies: - dependency-name: gitpython dependency-version: 3.1.57 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- requirements/docs.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/docs.txt b/requirements/docs.txt index c2546d51..966cf626 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -128,9 +128,9 @@ gitdb==4.0.11 \ --hash=sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4 \ --hash=sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b # via gitpython -gitpython==3.1.50 \ - --hash=sha256:80da2d12504d52e1f998772dc5baf6e553f8d2fcfe1fcc226c9d9a2ee3372dcc \ - --hash=sha256:d352abe2908d07355014abdd21ddf798c2a961469239afec4962e9da884858f9 +gitpython==3.1.58 \ + --hash=sha256:621416df10ef3fd0e19fabf9172ddeed0fa704d353d04f194eec56a625a95b22 \ + --hash=sha256:d331e722577f0fd7fc1f857419b3ecc07af66282b933d2a4d95f84a042fdd50f # via mkdocs-git-revision-date-plugin idna==3.15 \ --hash=sha256:048adeaf8c2d788c40fee287673ccaa74c24ffd8dcf09ffa555a2fbb59f10ac8 \ From 26a0790b64df0c63d0dac01daf8ded9b5cd4e262 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 14 Aug 2026 20:22:01 +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)} "