Skip to content

Conversation

@sergei-maertens
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
cookie_consent/templatetags/cookie_consent_tags.py 73.77% <ø> (-19.68%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The invalid cases were not properly being used, reported by ruff.

The tests have been updated to pytest-style so we can parametrize the
inputs more easily.
Property based testing is better at finding bad examples than manual,
accidental inputs.
Suppressed one warning where the perf approach hurts
readability too much.
Automatic upgrade for the modern type annotations. Some manual
fixes were required for the string interpolation.

Along the way, the varname for an individual cookie is deprecated.

A code search in Github revealed that the accepted_cookies template
tag does not appear to be used in any public projects. Deprecating
it should be safe - I also can't really imagine how/why you'd use
this tag as it's documented and more common to check whether an
entire cookie group is accepted.
@sergei-maertens sergei-maertens marked this pull request as ready for review July 6, 2025 17:27
@sergei-maertens sergei-maertens merged commit a7539d1 into master Jul 6, 2025
16 checks passed
@sergei-maertens sergei-maertens deleted the chore/switch-to-ruff branch July 6, 2025 17:30
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.

2 participants