From 3516376d92c875729aee560f484d4a5645547584 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 1 Jan 2026 21:41:10 +0100 Subject: [PATCH] chore: cleanup auth code after debugging session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- src/auth/service.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fd6d03..6f6e1aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.6] - 2026-01-01 + +### Changed + +- Code cleanup: move inline `re` import to top of auth/service.py + ## [1.4.5] - 2026-01-01 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index d16023d..198304d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "core-api" -version = "1.4.5" +version = "1.4.6" description = "Core Code API - Infrastructure management and tools API" readme = "README.md" requires-python = ">=3.12" diff --git a/src/auth/service.py b/src/auth/service.py index 0117944..b738f29 100644 --- a/src/auth/service.py +++ b/src/auth/service.py @@ -3,6 +3,7 @@ Authentication Service Business logic for user synchronization from Authentik. """ +import re import uuid from datetime import datetime, timezone from typing import Optional @@ -251,7 +252,6 @@ class AuthService: def _extract_cookie(self, headers: httpx.Headers, cookie_name: str) -> str: """Extract a specific cookie value from Set-Cookie headers""" - import re for header in headers.get_list('set-cookie'): if header.startswith(f'{cookie_name}='): match = re.match(rf'{cookie_name}=([^;]+)', header)