Skip to content

1 0 4#3

Merged
grounzero merged 24 commits intomainfrom
1-0-4
Nov 2, 2025
Merged

1 0 4#3
grounzero merged 24 commits intomainfrom
1-0-4

Conversation

@grounzero
Copy link
Copy Markdown
Owner

This pull request introduces several improvements focused on modernizing the codebase, enhancing static analysis, and updating CI/CD workflows. The most significant changes include raising the minimum supported Python version to 3.9, adopting modern type hint syntax, adding strict and relaxed linter configurations, and updating workflows to test newer Python versions. Additionally, the code has been refactored to improve maintainability and eliminate linter warnings.

Python version and type hint modernization:

  • Upgraded the minimum supported Python version from 3.8 to 3.9, and updated all type hints to use from __future__ import annotations and PEP 604 union syntax (e.g., X | Y), replacing typing imports with built-in types throughout pfsense_redactor/redactor.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Linter and security configuration:

  • Added .pylintrc (strict for production code), .pylintrc-tests (relaxed for test code), and .bandit (security linting) configuration files for consistent static analysis. [1] [2] [3]
  • Refactored code to resolve all pylint, Prospector, and Bandit warnings.

CI/CD workflow updates:

  • Updated GitHub Actions workflows to test against Python 3.9–3.13 (removing 3.8), and split pylint checks for production and test code with appropriate configuration files. [1] [2] [3]
  • Added a new workflow, update-snapshots.yml, to automate updating of reference test snapshots.

Documentation:

  • Updated CHANGELOG.md to reflect all major changes, including Python version bump, type hint modernization, linter/security config additions, and CI updates. [1] [2]

Code maintainability and bug fixes:

  • Refactored masking logic in pfsense_redactor/redactor.py for clarity and maintainability by breaking out category-specific masking into dedicated methods. [1] [2]
  • Removed legacy compatibility code (e.g., ET.indent() try/except block) now that Python 3.9+ is required.

These changes collectively modernize the project, improve developer experience, and ensure robust static analysis across both production and test code.

@grounzero grounzero merged commit 5fb1bde into main Nov 2, 2025
33 checks passed
@grounzero grounzero deleted the 1-0-4 branch November 2, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant