Skip to content

Replace re_path with path where practical#3627

Merged
aleksfl merged 4 commits intomasterfrom
feature/replace-relevant-re_path-with-path
Oct 28, 2025
Merged

Replace re_path with path where practical#3627
aleksfl merged 4 commits intomasterfrom
feature/replace-relevant-re_path-with-path

Conversation

@aleksfl
Copy link
Copy Markdown
Contributor

@aleksfl aleksfl commented Oct 23, 2025

Scope and purpose

Fixes #3548

This PR sticks to replacing re_path where it is practical and results in almost or fully identical behavior.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • Wrote the commit message so that the first line continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.

@aleksfl aleksfl linked an issue Oct 23, 2025 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 23, 2025

Test results

    27 files      27 suites   44m 39s ⏱️
 2 625 tests  2 625 ✅ 0 💤 0 ❌
19 390 runs  19 390 ✅ 0 💤 0 ❌

Results for commit ad5ba61.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.50%. Comparing base (ac1e688) to head (ad5ba61).
⚠️ Report is 259 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3627      +/-   ##
==========================================
- Coverage   62.50%   62.50%   -0.01%     
==========================================
  Files         611      611              
  Lines       45103    45100       -3     
  Branches       43       43              
==========================================
- Hits        28193    28190       -3     
  Misses      16900    16900              
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@aleksfl aleksfl self-assigned this Oct 24, 2025
@aleksfl aleksfl requested a review from a team October 24, 2025 08:40
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some good work here 😄 Just have some questions/comments and a bug that should be addressed.

@Simrayz Simrayz requested a review from hmpf October 24, 2025 09:38
Copy link
Copy Markdown
Contributor

@hmpf hmpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to have overlooked some re_paths, and you have not been explicit with param types in many places. Explicitness aids readability. Imagine having to debug on the first day back from a max-length vacation, with jet-lag and a hangover.

Also, if switching to path() is impossible, document why on the preceding line.

I haven't commented on every spot where a param type is missing. grep '<' **/urls.py | grep -v ':' might find them.

(.. and I see that Github's highlighter still highlights other lines than the ones I clicked on... sigh)

@hmpf hmpf requested a review from a team October 27, 2025 07:01
@aleksfl aleksfl force-pushed the feature/replace-relevant-re_path-with-path branch from fe66e21 to ad5ba61 Compare October 28, 2025 08:53
@sonarqubecloud
Copy link
Copy Markdown

@hmpf hmpf self-requested a review October 28, 2025 09:07
@hmpf hmpf requested a review from Simrayz October 28, 2025 09:13
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 😄

@aleksfl aleksfl merged commit 5e29710 into master Oct 28, 2025
19 checks passed
@aleksfl aleksfl deleted the feature/replace-relevant-re_path-with-path branch October 28, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace trickier usage of re_path with path

3 participants