From 81dab90b55bfddc2adaf9f6c82a433135bb1e426 Mon Sep 17 00:00:00 2001 From: KronosDev-Pro Date: Tue, 5 Nov 2024 11:00:57 +0000 Subject: [PATCH] fix f-string bug --- reflex/compiler/compiler.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 57c851b03..092871dbd 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -218,7 +218,7 @@ def _compile_root_stylesheet(stylesheets: list[str]) -> str: stylesheets += [ str(p.relative_to(assets_app_path)) for p in stylesheet_full_path.iterdir() - if not p.is_symlink() + if not (p.is_symlink() and p.is_dir()) ] continue else: @@ -239,7 +239,9 @@ def _compile_root_stylesheet(stylesheets: list[str]) -> str: ): target = ( Path.cwd() - / f"{constants.Dirs.WEB}/{constants.Dirs.STYLES}/{RE_SASS_SCSS_EXT.sub(".css", str(stylesheet)).strip('/')}" + / constants.Dirs.WEB + / constants.Dirs.STYLES + / RE_SASS_SCSS_EXT.sub(".css", str(stylesheet)).strip("/") ) target.parent.mkdir(parents=True, exist_ok=True) target.write_text( @@ -251,7 +253,7 @@ def _compile_root_stylesheet(stylesheets: list[str]) -> str: else: pass - stylesheet = f"./{RE_SASS_SCSS_EXT.sub(".css", str(stylesheet)).strip('/')}" + stylesheet = f"./{RE_SASS_SCSS_EXT.sub('.css', str(stylesheet)).strip('/')}" sheets.append(stylesheet) if stylesheet not in sheets else None