Skip to content

Commit ffd4831

Browse files
authored
V3.10.9
1 parent 083f9e5 commit ffd4831

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

flet_navigator/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
_global_templates: dict[str, 'TemplateDefinition'] = {}
2020

2121

22-
_url_fn_space_chr: str = '<FN3108S>'
22+
_url_fn_space_chr: str = '<FN3109S>'
2323

2424

25-
FLET_NAVIGATOR_VERSION: str = '3.10.8'
25+
FLET_NAVIGATOR_VERSION: str = '3.10.9'
2626
"""The version of the Flet Navigator."""
2727

2828

@@ -199,7 +199,7 @@ def init_nav(nav: Union['VirtualFletNavigator', 'PublicFletNavigator'], page: Pa
199199

200200
for route in nav.routes:
201201
if route != '/' and route != ROUTE_404:
202-
if not re_compile(nav._afn_vroute).match(route):
202+
if not nav._afn_vroute.match(route):
203203
routes_to_delete.append(route)
204204

205205
nav._logger.error(f'Invalid route name: "{route}". Route names must start with a letter or underscore and contain only alphanumeric characters or underscores.')
@@ -504,10 +504,10 @@ def load_page(path: str, name: Optional[str]=None) -> PageDefinition:
504504

505505
try:
506506
page = getattr(import_module(path), _pd := path.split('.')[-1] if not name else name)
507-
except ModuleNotFoundError:
508-
raise TypeError(f'Failed to load page definition module: "{path}".')
509-
except AttributeError:
510-
raise ImportError(f'Failed to load page definition: "{_pd}".')
507+
except ModuleNotFoundError as module_exc:
508+
raise TypeError(f'Failed to load page definition module: "{path}".') from module_exc
509+
except AttributeError as attr_error:
510+
raise ImportError(f'Failed to load page definition: "{_pd}".') from attr_error
511511

512512
return page
513513

0 commit comments

Comments
 (0)