Repository navigation
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #4168.
_infer_pathsplit the module name on the pages folder name as a substring, sopages/landing_pages.pygot/,pages/subpages/report.pygot/report, and two such pages made every request fail with a duplicate path error. It now matches the folder name only as a whole dotted part of the module name (still the last match, as before), so those pages get/landing-pagesand/subpages/report. Module names where the folder name is already a whole part (all existing test cases, including dotted folder names likecustom.pages) keep the same path.Tests: three new cases in
tests/unit/pages/test_pages.py::test_infer_pathandtest_pain001intests/integration/multi_page/test_pages_infer_path.py(aviews/pages folder withoverviews.pyandreviews/latest.py, opened withdash_duo). Both fail ondev(views.overviewsgets/,views.reviews.latestgets/latest) and pass with the fix.pytest tests/unitandtests/integration/multi_pagepass locally on Python 3.14 (apart frompala006, which needs the locally unbuiltdash_test_components); black, flake8 and pylint are clean on Python 3.10.Contributor Checklist
dev(fix or chore) ornext(feature, new API, breaking change), see Which branch to target_infer_pathoptionals
CHANGELOG.mdGenerated with Claude Code