1
0
benedikt-bartscher 6 сар өмнө
parent
commit
2cb193e8d6
30 өөрчлөгдсөн 32 нэмэгдсэн , 32 устгасан
  1. 2 2
      benchmarks/test_benchmark_compile_pages.py
  2. 2 2
      reflex/testing.py
  3. 1 1
      tests/integration/test_background_task.py
  4. 1 1
      tests/integration/test_call_script.py
  5. 1 1
      tests/integration/test_client_storage.py
  6. 1 1
      tests/integration/test_component_state.py
  7. 1 1
      tests/integration/test_computed_vars.py
  8. 1 1
      tests/integration/test_connection_banner.py
  9. 1 1
      tests/integration/test_deploy_url.py
  10. 1 1
      tests/integration/test_dynamic_components.py
  11. 1 1
      tests/integration/test_dynamic_routes.py
  12. 1 1
      tests/integration/test_event_actions.py
  13. 1 1
      tests/integration/test_event_chain.py
  14. 1 1
      tests/integration/test_exception_handlers.py
  15. 1 1
      tests/integration/test_form_submit.py
  16. 1 1
      tests/integration/test_input.py
  17. 1 1
      tests/integration/test_lifespan.py
  18. 1 1
      tests/integration/test_login_flow.py
  19. 1 1
      tests/integration/test_media.py
  20. 1 1
      tests/integration/test_navigation.py
  21. 1 1
      tests/integration/test_server_side_event.py
  22. 1 1
      tests/integration/test_shared_state.py
  23. 1 1
      tests/integration/test_state_inheritance.py
  24. 1 1
      tests/integration/test_tailwind.py
  25. 1 1
      tests/integration/test_upload.py
  26. 1 1
      tests/integration/test_var_operations.py
  27. 1 1
      tests/integration/tests_playwright/test_stateless_app.py
  28. 1 1
      tests/integration/tests_playwright/test_table.py
  29. 1 1
      tests/test_node_version.py
  30. 1 1
      tests/units/test_testing.py

+ 2 - 2
benchmarks/test_benchmark_compile_pages.py

@@ -212,7 +212,7 @@ def app_with_one_page(
     """
     root = tmp_path_factory.mktemp("app1")
 
-    yield AppHarness.create(root=root, app_source=AppWithOnePage)  # type: ignore
+    yield AppHarness.create(root=root, app_source=AppWithOnePage)
 
 
 @pytest.fixture(scope="session")
@@ -276,7 +276,7 @@ def app_with_thousand_pages(
 
     yield AppHarness.create(
         root=root,
-        app_source=functools.partial(  # type: ignore
+        app_source=functools.partial(
             AppWithThousandPages,
             render_comp=render_multiple_pages,  # type: ignore
         ),

+ 2 - 2
reflex/testing.py

@@ -118,7 +118,7 @@ class AppHarness:
 
     app_name: str
     app_source: Optional[
-        types.FunctionType | types.ModuleType | str | functools.partial[Any]
+        Callable[[], None] | types.ModuleType | str | functools.partial[Any]
     ]
     app_path: pathlib.Path
     app_module_path: pathlib.Path
@@ -138,7 +138,7 @@ class AppHarness:
         cls,
         root: pathlib.Path,
         app_source: Optional[
-            types.FunctionType | types.ModuleType | str | functools.partial[Any]
+            Callable[[], None] | types.ModuleType | str | functools.partial[Any]
         ] = None,
         app_name: Optional[str] = None,
     ) -> "AppHarness":

+ 1 - 1
tests/integration/test_background_task.py

@@ -190,7 +190,7 @@ def background_task(
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("background_task"),
-        app_source=BackgroundTask,  # type: ignore
+        app_source=BackgroundTask,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_call_script.py

@@ -355,7 +355,7 @@ def call_script(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("call_script"),
-        app_source=CallScript,  # type: ignore
+        app_source=CallScript,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_client_storage.py

@@ -137,7 +137,7 @@ def client_side(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("client_side"),
-        app_source=ClientSide,  # type: ignore
+        app_source=ClientSide,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_component_state.py

@@ -115,7 +115,7 @@ def component_state_app(tmp_path) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=ComponentStateApp,  # type: ignore
+        app_source=ComponentStateApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_computed_vars.py

@@ -125,7 +125,7 @@ def computed_vars(
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("computed_vars"),
-        app_source=ComputedVars,  # type: ignore
+        app_source=ComputedVars,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_connection_banner.py

@@ -52,7 +52,7 @@ def connection_banner(tmp_path) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=ConnectionBanner,  # type: ignore
+        app_source=ConnectionBanner,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_deploy_url.py

@@ -44,7 +44,7 @@ def deploy_url_sample(
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("deploy_url_sample"),
-        app_source=DeployUrlSample,  # type: ignore
+        app_source=DeployUrlSample,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_dynamic_components.py

@@ -85,7 +85,7 @@ def dynamic_components(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("dynamic_components"),
-        app_source=DynamicComponents,  # type: ignore
+        app_source=DynamicComponents,
     ) as harness:
         assert harness.app_instance is not None, "app is not running"
         yield harness

+ 1 - 1
tests/integration/test_dynamic_routes.py

@@ -155,7 +155,7 @@ def dynamic_route(
     with app_harness_env.create(
         root=tmp_path_factory.mktemp("dynamic_route"),
         app_name=f"dynamicroute_{app_harness_env.__name__.lower()}",
-        app_source=DynamicRoute,  # type: ignore
+        app_source=DynamicRoute,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_event_actions.py

@@ -172,7 +172,7 @@ def event_action(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("event_action"),
-        app_source=TestEventAction,  # type: ignore
+        app_source=TestEventAction,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_event_chain.py

@@ -277,7 +277,7 @@ def event_chain(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("event_chain"),
-        app_source=EventChain,  # type: ignore
+        app_source=EventChain,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_exception_handlers.py

@@ -70,7 +70,7 @@ def test_app(
     with app_harness_env.create(
         root=tmp_path_factory.mktemp("test_app"),
         app_name=f"testapp_{app_harness_env.__name__.lower()}",
-        app_source=TestApp,  # type: ignore
+        app_source=TestApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_form_submit.py

@@ -159,7 +159,7 @@ def form_submit(request, tmp_path_factory) -> Generator[AppHarness, None, None]:
     param_id = request._pyfuncitem.callspec.id.replace("-", "_")
     with AppHarness.create(
         root=tmp_path_factory.mktemp("form_submit"),
-        app_source=request.param,  # type: ignore
+        app_source=request.param,
         app_name=request.param.func.__name__ + f"_{param_id}",
     ) as harness:
         assert harness.app_instance is not None, "app is not running"

+ 1 - 1
tests/integration/test_input.py

@@ -63,7 +63,7 @@ def fully_controlled_input(tmp_path) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=FullyControlledInput,  # type: ignore
+        app_source=FullyControlledInput,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_lifespan.py

@@ -80,7 +80,7 @@ def lifespan_app(tmp_path) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=LifespanApp,  # type: ignore
+        app_source=LifespanApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_login_flow.py

@@ -62,7 +62,7 @@ def login_sample(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("login_sample"),
-        app_source=LoginSample,  # type: ignore
+        app_source=LoginSample,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_media.py

@@ -84,7 +84,7 @@ def media_app(tmp_path) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=MediaApp,  # type: ignore
+        app_source=MediaApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_navigation.py

@@ -52,7 +52,7 @@ def navigation_app(tmp_path) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=NavigationApp,  # type: ignore
+        app_source=NavigationApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_server_side_event.py

@@ -93,7 +93,7 @@ def server_side_event(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("server_side_event"),
-        app_source=ServerSideEvent,  # type: ignore
+        app_source=ServerSideEvent,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_shared_state.py

@@ -39,7 +39,7 @@ def shared_state(
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("shared_state"),
-        app_source=SharedStateApp,  # type: ignore
+        app_source=SharedStateApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_state_inheritance.py

@@ -217,7 +217,7 @@ def state_inheritance(
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("state_inheritance"),
-        app_source=StateInheritance,  # type: ignore
+        app_source=StateInheritance,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_tailwind.py

@@ -78,7 +78,7 @@ def tailwind_app(tmp_path, tailwind_disabled) -> Generator[AppHarness, None, Non
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=functools.partial(TailwindApp, tailwind_disabled=tailwind_disabled),  # type: ignore
+        app_source=functools.partial(TailwindApp, tailwind_disabled=tailwind_disabled),
         app_name="tailwind_disabled_app" if tailwind_disabled else "tailwind_app",
     ) as harness:
         yield harness

+ 1 - 1
tests/integration/test_upload.py

@@ -133,7 +133,7 @@ def upload_file(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("upload_file"),
-        app_source=UploadFile,  # type: ignore
+        app_source=UploadFile,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/test_var_operations.py

@@ -613,7 +613,7 @@ def var_operations(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("var_operations"),
-        app_source=VarOperations,  # type: ignore
+        app_source=VarOperations,
     ) as harness:
         assert harness.app_instance is not None, "app is not running"
         yield harness

+ 1 - 1
tests/integration/tests_playwright/test_stateless_app.py

@@ -33,7 +33,7 @@ def stateless_app(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("stateless_app"),
-        app_source=StatelessApp,  # type: ignore
+        app_source=StatelessApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/integration/tests_playwright/test_table.py

@@ -68,7 +68,7 @@ def table_app(tmp_path_factory) -> Generator[AppHarness, None, None]:
     """
     with AppHarness.create(
         root=tmp_path_factory.mktemp("table"),
-        app_source=Table,  # type: ignore
+        app_source=Table,
     ) as harness:
         assert harness.app_instance is not None, "app is not running"
         yield harness

+ 1 - 1
tests/test_node_version.py

@@ -43,7 +43,7 @@ def node_version_app(tmp_path) -> Generator[AppHarness, Any, None]:
     """
     with AppHarness.create(
         root=tmp_path,
-        app_source=TestNodeVersionApp,  # type: ignore
+        app_source=TestNodeVersionApp,
     ) as harness:
         yield harness
 

+ 1 - 1
tests/units/test_testing.py

@@ -29,7 +29,7 @@ def test_app_harness(tmp_path):
 
     with AppHarness.create(
         root=tmp_path,
-        app_source=BasicApp,  # type: ignore
+        app_source=BasicApp,
     ) as harness:
         assert harness.app_instance is not None
         assert harness.backend is not None