Skip to content

Commit 7558567

Browse files
authored
Merge pull request #2102 from AnnMarieW/fix-pages-exclude-files
fixed pages to exclude files starting with `.`
2 parents d558862 + d21da84 commit 7558567

File tree

7 files changed

+9
-11
lines changed

7 files changed

+9
-11
lines changed

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
55
## [UNRELEASED]
66

77
### Fixed
8-
8+
- [#2102](https://github.com/plotly/dash/pull/2102) Fix bug as reported in [dash-labs #113](https://github.com/plotly/dash-labs/issues/113) where files starting with `.` were not excluded when building `dash.page_registry`.
99
- [#2098](https://github.com/plotly/dash/pull/2098) Accept HTTP code 400 as well as 401 for JWT expiry
1010
- [#2097](https://github.com/plotly/dash/pull/2097) Fix bug [#2095](https://github.com/plotly/dash/issues/2095) with TypeScript compiler and `React.FC` empty valueDeclaration error & support empty props components.
1111
- [#2104](https://github.com/plotly/dash/pull/2104) Fix bug [#2099](https://github.com/plotly/dash/issues/2099) with Dropdown clearing search value when a value is selected.

Diff for: dash/_pages.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ def register_page(
199199
APNG, AVIF, GIF, JPEG, JPG, PNG, SVG, WebP.
200200
201201
- `image_url`:
202-
This will use the exact image url provided when sharing on social media.
203-
This is appealing when the image you want to share is hosted on a CDN.
204-
Using this attribute overrides the image attribute.
202+
Overrides the image property and sets the `<image>` meta tag to the provided image URL.
205203
206204
- `redirect_from`:
207205
A list of paths that should redirect to this page.

Diff for: dash/dash.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,11 @@ def _import_layouts_from_pages(self):
21672167

21682168
for (root, _, files) in os.walk(walk_dir):
21692169
for file in files:
2170-
if file.startswith("_") or not file.endswith(".py"):
2170+
if (
2171+
file.startswith("_")
2172+
or file.startswith(".")
2173+
or not file.endswith(".py")
2174+
):
21712175
continue
21722176
with open(os.path.join(root, file), encoding="utf-8") as f:
21732177
content = f.read()

Diff for: tests/integration/multi_page/pages/.no_import.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
raise Exception("files starting with . should not be imported")

Diff for: tests/integration/multi_page/pages/_no_import.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
raise Exception("files starting with _ should not be imported")

Diff for: usage-pages/pages_error/__init__.py

Whitespace-only changes.

Diff for: usage-pages/pages_error/page1.py

-6
This file was deleted.

0 commit comments

Comments
 (0)