diff --git a/reflex/app.py b/reflex/app.py index c52f0ef8a..4af183367 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -839,6 +839,9 @@ class App(Base): compile_results.append( compiler.compile_contexts(self.state, self.theme), ) + # Fix #2992 by removing the top-level appearance prop + if self.theme is not None: + self.theme.appearance = None app_root = self._app_root(app_wrappers=app_wrappers) diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py index 82eb7cb80..208696979 100644 --- a/reflex/utils/pyi_generator.py +++ b/reflex/utils/pyi_generator.py @@ -34,6 +34,7 @@ PWD = Path(".").resolve() EXCLUDED_FILES = [ "__init__.py", + "app.py", "component.py", "bare.py", "foreach.py", @@ -795,7 +796,11 @@ class PyiGenerator: file_targets = [] for target in targets: target_path = Path(target) - if target_path.is_file() and target_path.suffix == ".py": + if ( + target_path.is_file() + and target_path.suffix == ".py" + and target_path.name not in EXCLUDED_FILES + ): file_targets.append(target_path) continue if not target_path.is_dir():