reflex 0.7.4a1__py3-none-any.whl → 0.7.4a2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of reflex might be problematic. Click here for more details.

@@ -1,5 +1,5 @@
1
1
  import { useTheme } from "next-themes";
2
- import { useEffect, useState } from "react";
2
+ import { useRef, useEffect, useState } from "react";
3
3
  import {
4
4
  ColorModeContext,
5
5
  defaultColorMode,
@@ -13,6 +13,14 @@ export default function RadixThemesColorModeProvider({ children }) {
13
13
  const [resolvedColorMode, setResolvedColorMode] = useState(
14
14
  defaultColorMode === "dark" ? "dark" : "light",
15
15
  );
16
+ const firstUpdate = useRef(true);
17
+ useEffect(() => {
18
+ if (firstUpdate.current) {
19
+ firstUpdate.current = false;
20
+ setRawColorMode(theme);
21
+ setResolvedColorMode(resolvedTheme);
22
+ }
23
+ });
16
24
 
17
25
  useEffect(() => {
18
26
  if (isDevMode) {
reflex/app.py CHANGED
@@ -968,7 +968,7 @@ class App(MiddlewareMixin, LifespanMixin):
968
968
  # Check the nocompile file.
969
969
  if nocompile.exists():
970
970
  # Delete the nocompile file
971
- nocompile.unlink()
971
+ nocompile.unlink(missing_ok=True)
972
972
  return False
973
973
 
974
974
  # By default, compile the app.
@@ -1258,7 +1258,9 @@ class App(MiddlewareMixin, LifespanMixin):
1258
1258
  compiler.compile_document_root(
1259
1259
  self.head_components,
1260
1260
  html_lang=self.html_lang,
1261
- html_custom_attrs=self.html_custom_attrs, # pyright: ignore [reportArgumentType]
1261
+ html_custom_attrs=(
1262
+ {**self.html_custom_attrs} if self.html_custom_attrs else {}
1263
+ ),
1262
1264
  )
1263
1265
  )
1264
1266
 
reflex/base.py CHANGED
@@ -38,7 +38,7 @@ def validate_field_name(bases: list[Type["BaseModel"]], field_name: str) -> None
38
38
 
39
39
  # monkeypatch pydantic validate_field_name method to skip validating
40
40
  # shadowed state vars when reloading app via utils.prerequisites.get_app(reload=True)
41
- pydantic_main.validate_field_name = validate_field_name # pyright: ignore [reportPossiblyUnboundVariable, reportPrivateImportUsage]
41
+ pydantic_main.validate_field_name = validate_field_name # pyright: ignore [reportPrivateImportUsage]
42
42
 
43
43
  if TYPE_CHECKING:
44
44
  from reflex.vars import Var
@@ -107,7 +107,7 @@ class Base(BaseModel):
107
107
  default_value: The default value of the field
108
108
  """
109
109
  var_name = var._var_field_name
110
- new_field = ModelField.infer( # pyright: ignore [reportPossiblyUnboundVariable]
110
+ new_field = ModelField.infer(
111
111
  name=var_name,
112
112
  value=default_value,
113
113
  annotation=var._var_type,
@@ -128,5 +128,5 @@ class Base(BaseModel):
128
128
  if isinstance(key, str):
129
129
  # Seems like this function signature was wrong all along?
130
130
  # If the user wants a field that we know of, get it and pass it off to _get_value
131
- return getattr(self, key, key)
131
+ return getattr(self, key)
132
132
  return key
@@ -20,6 +20,7 @@ from reflex.config import environment, get_config
20
20
  from reflex.state import BaseState
21
21
  from reflex.style import SYSTEM_COLOR_MODE
22
22
  from reflex.utils import console, path_ops
23
+ from reflex.utils.exceptions import ReflexError
23
24
  from reflex.utils.exec import is_prod_mode
24
25
  from reflex.utils.imports import ImportVar
25
26
  from reflex.utils.prerequisites import get_web_dir
@@ -651,6 +652,8 @@ def into_component(component: Component | ComponentCallable) -> Component:
651
652
  ):
652
653
  return converted
653
654
  except KeyError as e:
655
+ if isinstance(e, ReflexError):
656
+ raise
654
657
  key = e.args[0] if e.args else None
655
658
  if key is not None and isinstance(key, Var):
656
659
  raise TypeError(
@@ -658,6 +661,8 @@ def into_component(component: Component | ComponentCallable) -> Component:
658
661
  ).with_traceback(e.__traceback__) from None
659
662
  raise
660
663
  except TypeError as e:
664
+ if isinstance(e, ReflexError):
665
+ raise
661
666
  message = e.args[0] if e.args else None
662
667
  if message and isinstance(message, str):
663
668
  if message.endswith("has no len()") and (
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import contextlib
5
6
  import copy
6
7
  import dataclasses
7
8
  import functools
@@ -1974,13 +1975,15 @@ class NoSSRComponent(Component):
1974
1975
  # Do NOT import the main library/tag statically.
1975
1976
  import_name = self._get_import_name()
1976
1977
  if import_name is not None:
1977
- _imports[import_name] = [
1978
+ with contextlib.suppress(ValueError):
1979
+ _imports[import_name].remove(self.import_var)
1980
+ _imports[import_name].append(
1978
1981
  imports.ImportVar(
1979
1982
  tag=None,
1980
1983
  render=False,
1981
1984
  transpile=self._should_transpile(self.library),
1982
- ),
1983
- ]
1985
+ )
1986
+ )
1984
1987
 
1985
1988
  return imports.merge_imports(
1986
1989
  dynamic_import,
reflex/config.py CHANGED
@@ -44,7 +44,7 @@ from reflex.utils.types import (
44
44
  )
45
45
 
46
46
  try:
47
- from dotenv import load_dotenv # pyright: ignore [reportMissingImports]
47
+ from dotenv import load_dotenv
48
48
  except ImportError:
49
49
  load_dotenv = None
50
50
 
reflex/reflex.py CHANGED
@@ -205,18 +205,22 @@ def _run(
205
205
  prerequisites.check_latest_package_version(constants.Reflex.MODULE_NAME)
206
206
 
207
207
  # Get the app module.
208
- app_task = prerequisites.compile_app if frontend else prerequisites.validate_app
208
+ app_task = prerequisites.compile_or_validate_app
209
+ args = (frontend,)
209
210
 
210
211
  # Granian fails if the app is already imported.
211
212
  if should_use_granian():
212
213
  import concurrent.futures
213
214
 
214
215
  compile_future = concurrent.futures.ProcessPoolExecutor(max_workers=1).submit(
215
- app_task
216
+ app_task,
217
+ *args,
216
218
  )
217
- compile_future.result()
219
+ validation_result = compile_future.result()
218
220
  else:
219
- app_task()
221
+ validation_result = app_task(*args)
222
+ if not validation_result:
223
+ raise typer.Exit(1)
220
224
 
221
225
  # Warn if schema is not up to date.
222
226
  prerequisites.check_schema_up_to_date()
reflex/utils/exec.py CHANGED
@@ -189,9 +189,11 @@ def run_frontend_prod(root: Path, port: str, backend_present: bool = True):
189
189
 
190
190
  @once
191
191
  def _warn_user_about_uvicorn():
192
- console.warn(
193
- "Using Uvicorn for backend as it is installed. This behavior will change in 0.8.0 to use Granian by default."
194
- )
192
+ # When we eventually switch to Granian by default, we should enable this warning.
193
+ if False:
194
+ console.warn(
195
+ "Using Uvicorn for backend as it is installed. This behavior will change in 0.8.0 to use Granian by default."
196
+ )
195
197
 
196
198
 
197
199
  def should_use_granian():
@@ -357,70 +359,74 @@ def run_granian_backend(host: str, port: int, loglevel: LogLevel):
357
359
  ).serve()
358
360
 
359
361
 
362
+ def _deprecate_asgi_config(
363
+ config_name: str,
364
+ reason: str = "",
365
+ ):
366
+ # When we eventually switch to Granian by default, we should enable this deprecation.
367
+ if False:
368
+ console.deprecate(
369
+ f"config.{config_name}",
370
+ reason=reason,
371
+ deprecation_version="0.7.5",
372
+ removal_version="0.8.0",
373
+ )
374
+
375
+
360
376
  @once
361
377
  def _get_backend_workers():
362
378
  from reflex.utils import processes
363
379
 
364
380
  config = get_config()
365
381
 
382
+ gunicorn_workers = config.gunicorn_workers or 0
383
+
366
384
  if config.gunicorn_workers is not None:
367
- console.deprecate(
368
- "config.gunicorn_workers",
369
- reason="If you're using Granian, use GRANIAN_WORKERS instead.",
370
- deprecation_version="0.7.4",
371
- removal_version="0.8.0",
385
+ _deprecate_asgi_config(
386
+ "gunicorn_workers",
387
+ "If you're using Granian, use GRANIAN_WORKERS instead.",
372
388
  )
373
389
 
374
- return (
375
- processes.get_num_workers()
376
- if not config.gunicorn_workers
377
- else config.gunicorn_workers
378
- )
390
+ return gunicorn_workers if gunicorn_workers else processes.get_num_workers()
379
391
 
380
392
 
381
393
  @once
382
394
  def _get_backend_timeout():
383
395
  config = get_config()
384
396
 
397
+ timeout = config.timeout or 120
398
+
385
399
  if config.timeout is not None:
386
- console.deprecate(
387
- "config.timeout",
388
- reason="If you're using Granian, use GRANIAN_WORKERS_LIFETIME instead.",
389
- deprecation_version="0.7.4",
390
- removal_version="0.8.0",
400
+ _deprecate_asgi_config(
401
+ "timeout",
402
+ "If you're using Granian, use GRANIAN_WORKERS_LIFETIME instead.",
391
403
  )
392
404
 
393
- return config.timeout
405
+ return timeout
394
406
 
395
407
 
396
408
  @once
397
409
  def _get_backend_max_requests():
398
410
  config = get_config()
399
411
 
412
+ gunicorn_max_requests = config.gunicorn_max_requests or 120
413
+
400
414
  if config.gunicorn_max_requests is not None:
401
- console.deprecate(
402
- "config.gunicorn_max_requests",
403
- reason="",
404
- deprecation_version="0.7.4",
405
- removal_version="0.8.0",
406
- )
415
+ _deprecate_asgi_config("gunicorn_max_requests")
407
416
 
408
- return config.gunicorn_max_requests
417
+ return gunicorn_max_requests
409
418
 
410
419
 
411
420
  @once
412
421
  def _get_backend_max_requests_jitter():
413
422
  config = get_config()
414
423
 
424
+ gunicorn_max_requests_jitter = config.gunicorn_max_requests_jitter or 25
425
+
415
426
  if config.gunicorn_max_requests_jitter is not None:
416
- console.deprecate(
417
- "config.gunicorn_max_requests_jitter",
418
- reason="",
419
- deprecation_version="0.7.4",
420
- removal_version="0.8.0",
421
- )
427
+ _deprecate_asgi_config("gunicorn_max_requests_jitter")
422
428
 
423
- return config.gunicorn_max_requests_jitter
429
+ return gunicorn_max_requests_jitter
424
430
 
425
431
 
426
432
  def run_backend_prod(
@@ -8,6 +8,7 @@ import functools
8
8
  import importlib
9
9
  import importlib.metadata
10
10
  import importlib.util
11
+ import io
11
12
  import json
12
13
  import os
13
14
  import platform
@@ -183,7 +184,7 @@ def get_node_version() -> version.Version | None:
183
184
  try:
184
185
  result = processes.new_process([node_path, "-v"], run=True)
185
186
  # The output will be in the form "vX.Y.Z", but version.parse() can handle it
186
- return version.parse(result.stdout) # pyright: ignore [reportArgumentType]
187
+ return version.parse(result.stdout)
187
188
  except (FileNotFoundError, TypeError):
188
189
  return None
189
190
 
@@ -200,7 +201,7 @@ def get_bun_version() -> version.Version | None:
200
201
  try:
201
202
  # Run the bun -v command and capture the output
202
203
  result = processes.new_process([str(bun_path), "-v"], run=True)
203
- return version.parse(str(result.stdout)) # pyright: ignore [reportArgumentType]
204
+ return version.parse(str(result.stdout))
204
205
  except FileNotFoundError:
205
206
  return None
206
207
  except version.InvalidVersion as e:
@@ -449,6 +450,76 @@ def compile_app(reload: bool = False, export: bool = False) -> None:
449
450
  get_compiled_app(reload=reload, export=export)
450
451
 
451
452
 
453
+ def _can_colorize() -> bool:
454
+ """Check if the output can be colorized.
455
+
456
+ Copied from _colorize.can_colorize.
457
+
458
+ https://raw.githubusercontent.com/python/cpython/refs/heads/main/Lib/_colorize.py
459
+
460
+ Returns:
461
+ If the output can be colorized
462
+ """
463
+ file = sys.stdout
464
+
465
+ if not sys.flags.ignore_environment:
466
+ if os.environ.get("PYTHON_COLORS") == "0":
467
+ return False
468
+ if os.environ.get("PYTHON_COLORS") == "1":
469
+ return True
470
+ if os.environ.get("NO_COLOR"):
471
+ return False
472
+ if os.environ.get("FORCE_COLOR"):
473
+ return True
474
+ if os.environ.get("TERM") == "dumb":
475
+ return False
476
+
477
+ if not hasattr(file, "fileno"):
478
+ return False
479
+
480
+ if sys.platform == "win32":
481
+ try:
482
+ import nt
483
+
484
+ if not nt._supports_virtual_terminal():
485
+ return False
486
+ except (ImportError, AttributeError):
487
+ return False
488
+
489
+ try:
490
+ return os.isatty(file.fileno())
491
+ except io.UnsupportedOperation:
492
+ return file.isatty()
493
+
494
+
495
+ def compile_or_validate_app(compile: bool = False) -> bool:
496
+ """Compile or validate the app module based on the default config.
497
+
498
+ Args:
499
+ compile: Whether to compile the app.
500
+
501
+ Returns:
502
+ If the app is compiled successfully.
503
+ """
504
+ try:
505
+ if compile:
506
+ compile_app()
507
+ else:
508
+ validate_app()
509
+ except Exception as e:
510
+ import traceback
511
+
512
+ sys_exception = sys.exception()
513
+
514
+ try:
515
+ colorize = _can_colorize()
516
+ traceback.print_exception(e, colorize=colorize) # pyright: ignore[reportCallIssue]
517
+ except Exception:
518
+ traceback.print_exception(sys_exception)
519
+ return False
520
+ return True
521
+
522
+
452
523
  def get_redis() -> Redis | None:
453
524
  """Get the asynchronous redis client.
454
525
 
reflex/utils/processes.py CHANGED
@@ -10,7 +10,7 @@ import signal
10
10
  import subprocess
11
11
  from concurrent import futures
12
12
  from pathlib import Path
13
- from typing import Any, Callable, Generator, Sequence, Tuple
13
+ from typing import Any, Callable, Generator, Literal, Sequence, Tuple, overload
14
14
 
15
15
  import psutil
16
16
  import typer
@@ -142,12 +142,30 @@ def handle_port(service_name: str, port: int, auto_increment: bool) -> int:
142
142
  raise typer.Exit()
143
143
 
144
144
 
145
+ @overload
146
+ def new_process(
147
+ args: str | list[str] | list[str | None] | list[str | Path | None],
148
+ run: Literal[False] = False,
149
+ show_logs: bool = False,
150
+ **kwargs,
151
+ ) -> subprocess.Popen[str]: ...
152
+
153
+
154
+ @overload
155
+ def new_process(
156
+ args: str | list[str] | list[str | None] | list[str | Path | None],
157
+ run: Literal[True],
158
+ show_logs: bool = False,
159
+ **kwargs,
160
+ ) -> subprocess.CompletedProcess[str]: ...
161
+
162
+
145
163
  def new_process(
146
164
  args: str | list[str] | list[str | None] | list[str | Path | None],
147
165
  run: bool = False,
148
166
  show_logs: bool = False,
149
167
  **kwargs,
150
- ):
168
+ ) -> subprocess.CompletedProcess[str] | subprocess.Popen[str]:
151
169
  """Wrapper over subprocess.Popen to unify the launch of child processes.
152
170
 
153
171
  Args:
@@ -163,7 +181,8 @@ def new_process(
163
181
  Exit: When attempting to run a command with a None value.
164
182
  """
165
183
  # Check for invalid command first.
166
- if isinstance(args, list) and None in args:
184
+ non_empty_args = list(filter(None, args)) if isinstance(args, list) else [args]
185
+ if isinstance(args, list) and len(non_empty_args) != len(args):
167
186
  console.error(f"Invalid command: {args}")
168
187
  raise typer.Exit(1)
169
188
 
@@ -190,9 +209,15 @@ def new_process(
190
209
  "errors": "replace", # Avoid UnicodeDecodeError in unknown command output
191
210
  **kwargs,
192
211
  }
193
- console.debug(f"Running command: {args}")
194
- fn = subprocess.run if run else subprocess.Popen
195
- return fn(args, **kwargs) # pyright: ignore [reportCallIssue, reportArgumentType]
212
+ console.debug(f"Running command: {non_empty_args}")
213
+
214
+ def subprocess_p_open(args: subprocess._CMD, **kwargs):
215
+ return subprocess.Popen(args, **kwargs)
216
+
217
+ fn: Callable[..., subprocess.CompletedProcess[str] | subprocess.Popen[str]] = (
218
+ subprocess.run if run else subprocess_p_open
219
+ )
220
+ return fn(non_empty_args, **kwargs)
196
221
 
197
222
 
198
223
  @contextlib.contextmanager
@@ -311,6 +336,7 @@ def show_status(
311
336
  process: subprocess.Popen,
312
337
  suppress_errors: bool = False,
313
338
  analytics_enabled: bool = False,
339
+ prior_processes: Tuple[subprocess.Popen, ...] = (),
314
340
  ):
315
341
  """Show the status of a process.
316
342
 
@@ -319,15 +345,17 @@ def show_status(
319
345
  process: The process.
320
346
  suppress_errors: If True, do not exit if errors are encountered (for fallback).
321
347
  analytics_enabled: Whether analytics are enabled for this command.
348
+ prior_processes: The prior processes that have been run.
322
349
  """
323
- with console.status(message) as status:
324
- for line in stream_logs(
325
- message,
326
- process,
327
- suppress_errors=suppress_errors,
328
- analytics_enabled=analytics_enabled,
329
- ):
330
- status.update(f"{message} {line}")
350
+ for one_process in (*prior_processes, process):
351
+ with console.status(message) as status:
352
+ for line in stream_logs(
353
+ message,
354
+ one_process,
355
+ suppress_errors=suppress_errors,
356
+ analytics_enabled=analytics_enabled,
357
+ ):
358
+ status.update(f"{message} {line}")
331
359
 
332
360
 
333
361
  def show_progress(message: str, process: subprocess.Popen, checkpoints: list[str]):
@@ -381,6 +409,7 @@ def run_process_with_fallbacks(
381
409
  show_status_message: str,
382
410
  fallbacks: str | Sequence[str] | Sequence[Sequence[str]] | None = None,
383
411
  analytics_enabled: bool = False,
412
+ prior_processes: Tuple[subprocess.Popen, ...] = (),
384
413
  **kwargs,
385
414
  ):
386
415
  """Run subprocess and retry using fallback command if initial command fails.
@@ -390,7 +419,8 @@ def run_process_with_fallbacks(
390
419
  show_status_message: The status message to be displayed in the console.
391
420
  fallbacks: The fallback command to run if the initial command fails.
392
421
  analytics_enabled: Whether analytics are enabled for this command.
393
- kwargs: Kwargs to pass to new_process function.
422
+ prior_processes: The prior processes that have been run.
423
+ **kwargs: Kwargs to pass to new_process function.
394
424
  """
395
425
  process = new_process(get_command_with_loglevel(args), **kwargs)
396
426
  if not fallbacks:
@@ -399,6 +429,7 @@ def run_process_with_fallbacks(
399
429
  show_status_message,
400
430
  process,
401
431
  analytics_enabled=analytics_enabled,
432
+ prior_processes=prior_processes,
402
433
  )
403
434
  else:
404
435
  # Suppress errors for initial command, because we will try to fallback
@@ -411,7 +442,7 @@ def run_process_with_fallbacks(
411
442
  # retry with fallback command.
412
443
  fallback_with_args = (
413
444
  [current_fallback, *args[1:]]
414
- if isinstance(fallbacks, str)
445
+ if isinstance(current_fallback, str)
415
446
  else [*current_fallback, *args[1:]]
416
447
  )
417
448
  console.warn(
@@ -422,6 +453,7 @@ def run_process_with_fallbacks(
422
453
  show_status_message=show_status_message,
423
454
  fallbacks=next_fallbacks,
424
455
  analytics_enabled=analytics_enabled,
456
+ prior_processes=(*prior_processes, process),
425
457
  **kwargs,
426
458
  )
427
459
 
reflex/vars/base.py CHANGED
@@ -3016,41 +3016,6 @@ _decode_var_pattern = re.compile(_decode_var_pattern_re, flags=re.DOTALL)
3016
3016
  _global_vars: dict[int, Var] = {}
3017
3017
 
3018
3018
 
3019
- def _extract_var_data(value: Iterable) -> list[VarData | None]:
3020
- """Extract the var imports and hooks from an iterable containing a Var.
3021
-
3022
- Args:
3023
- value: The iterable to extract the VarData from
3024
-
3025
- Returns:
3026
- The extracted VarDatas.
3027
- """
3028
- from reflex.style import Style
3029
- from reflex.vars import Var
3030
-
3031
- var_datas = []
3032
- with contextlib.suppress(TypeError):
3033
- for sub in value:
3034
- if isinstance(sub, Var):
3035
- var_datas.append(sub._var_data)
3036
- elif not isinstance(sub, str):
3037
- # Recurse into dict values.
3038
- if hasattr(sub, "values") and callable(sub.values):
3039
- var_datas.extend(_extract_var_data(sub.values())) # pyright: ignore [reportArgumentType]
3040
- # Recurse into iterable values (or dict keys).
3041
- var_datas.extend(_extract_var_data(sub))
3042
-
3043
- # Style objects should already have _var_data.
3044
- if isinstance(value, Style):
3045
- var_datas.append(value._var_data)
3046
- else:
3047
- # Recurse when value is a dict itself.
3048
- values = getattr(value, "values", None)
3049
- if callable(values):
3050
- var_datas.extend(_extract_var_data(values())) # pyright: ignore [reportArgumentType]
3051
- return var_datas
3052
-
3053
-
3054
3019
  dispatchers: dict[GenericType, Callable[[Var], Var]] = {}
3055
3020
 
3056
3021
 
reflex/vars/datetime.py CHANGED
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import dataclasses
6
6
  from datetime import date, datetime
7
- from typing import Any, NoReturn, TypeVar, overload
7
+ from typing import Any, TypeVar
8
8
 
9
9
  from reflex.utils.exceptions import VarTypeError
10
10
  from reflex.vars.number import BooleanVar
@@ -35,13 +35,7 @@ def raise_var_type_error():
35
35
  class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)):
36
36
  """A variable that holds a datetime or date object."""
37
37
 
38
- @overload
39
- def __lt__(self, other: datetime_types) -> BooleanVar: ...
40
-
41
- @overload
42
- def __lt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
43
-
44
- def __lt__(self, other: Any):
38
+ def __lt__(self, other: datetime_types | DateTimeVar) -> BooleanVar:
45
39
  """Less than comparison.
46
40
 
47
41
  Args:
@@ -54,13 +48,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)):
54
48
  raise_var_type_error()
55
49
  return date_lt_operation(self, other)
56
50
 
57
- @overload
58
- def __le__(self, other: datetime_types) -> BooleanVar: ...
59
-
60
- @overload
61
- def __le__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
62
-
63
- def __le__(self, other: Any):
51
+ def __le__(self, other: datetime_types | DateTimeVar) -> BooleanVar:
64
52
  """Less than or equal comparison.
65
53
 
66
54
  Args:
@@ -73,13 +61,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)):
73
61
  raise_var_type_error()
74
62
  return date_le_operation(self, other)
75
63
 
76
- @overload
77
- def __gt__(self, other: datetime_types) -> BooleanVar: ...
78
-
79
- @overload
80
- def __gt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
81
-
82
- def __gt__(self, other: Any):
64
+ def __gt__(self, other: datetime_types | DateTimeVar) -> BooleanVar:
83
65
  """Greater than comparison.
84
66
 
85
67
  Args:
@@ -92,13 +74,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)):
92
74
  raise_var_type_error()
93
75
  return date_gt_operation(self, other)
94
76
 
95
- @overload
96
- def __ge__(self, other: datetime_types) -> BooleanVar: ...
97
-
98
- @overload
99
- def __ge__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
100
-
101
- def __ge__(self, other: Any):
77
+ def __ge__(self, other: datetime_types | DateTimeVar) -> BooleanVar:
102
78
  """Greater than or equal comparison.
103
79
 
104
80
  Args:
@@ -113,7 +89,7 @@ class DateTimeVar(Var[DATETIME_T], python_types=(datetime, date)):
113
89
 
114
90
 
115
91
  @var_operation
116
- def date_gt_operation(lhs: Var | Any, rhs: Var | Any) -> CustomVarOperationReturn:
92
+ def date_gt_operation(lhs: DateTimeVar | Any, rhs: DateTimeVar | Any):
117
93
  """Greater than comparison.
118
94
 
119
95
  Args:
@@ -127,7 +103,7 @@ def date_gt_operation(lhs: Var | Any, rhs: Var | Any) -> CustomVarOperationRetur
127
103
 
128
104
 
129
105
  @var_operation
130
- def date_lt_operation(lhs: Var | Any, rhs: Var | Any) -> CustomVarOperationReturn:
106
+ def date_lt_operation(lhs: DateTimeVar | Any, rhs: DateTimeVar | Any):
131
107
  """Less than comparison.
132
108
 
133
109
  Args:
@@ -141,7 +117,7 @@ def date_lt_operation(lhs: Var | Any, rhs: Var | Any) -> CustomVarOperationRetur
141
117
 
142
118
 
143
119
  @var_operation
144
- def date_le_operation(lhs: Var | Any, rhs: Var | Any) -> CustomVarOperationReturn:
120
+ def date_le_operation(lhs: DateTimeVar | Any, rhs: DateTimeVar | Any):
145
121
  """Less than or equal comparison.
146
122
 
147
123
  Args:
@@ -155,7 +131,7 @@ def date_le_operation(lhs: Var | Any, rhs: Var | Any) -> CustomVarOperationRetur
155
131
 
156
132
 
157
133
  @var_operation
158
- def date_ge_operation(lhs: Var | Any, rhs: Var | Any) -> CustomVarOperationReturn:
134
+ def date_ge_operation(lhs: DateTimeVar | Any, rhs: DateTimeVar | Any):
159
135
  """Greater than or equal comparison.
160
136
 
161
137
  Args:
@@ -172,7 +148,7 @@ def date_compare_operation(
172
148
  lhs: DateTimeVar[DATETIME_T] | Any,
173
149
  rhs: DateTimeVar[DATETIME_T] | Any,
174
150
  strict: bool = False,
175
- ) -> CustomVarOperationReturn:
151
+ ) -> CustomVarOperationReturn[bool]:
176
152
  """Check if the value is less than the other value.
177
153
 
178
154
  Args:
reflex/vars/number.py CHANGED
@@ -61,13 +61,7 @@ def raise_unsupported_operand_types(
61
61
  class NumberVar(Var[NUMBER_T], python_types=(int, float)):
62
62
  """Base class for immutable number vars."""
63
63
 
64
- @overload
65
- def __add__(self, other: number_types) -> NumberVar: ...
66
-
67
- @overload
68
- def __add__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
69
-
70
- def __add__(self, other: Any):
64
+ def __add__(self, other: number_types) -> NumberVar:
71
65
  """Add two numbers.
72
66
 
73
67
  Args:
@@ -80,13 +74,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
80
74
  raise_unsupported_operand_types("+", (type(self), type(other)))
81
75
  return number_add_operation(self, +other)
82
76
 
83
- @overload
84
- def __radd__(self, other: number_types) -> NumberVar: ...
85
-
86
- @overload
87
- def __radd__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
88
-
89
- def __radd__(self, other: Any):
77
+ def __radd__(self, other: number_types) -> NumberVar:
90
78
  """Add two numbers.
91
79
 
92
80
  Args:
@@ -99,13 +87,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
99
87
  raise_unsupported_operand_types("+", (type(other), type(self)))
100
88
  return number_add_operation(+other, self)
101
89
 
102
- @overload
103
- def __sub__(self, other: number_types) -> NumberVar: ...
104
-
105
- @overload
106
- def __sub__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
107
-
108
- def __sub__(self, other: Any):
90
+ def __sub__(self, other: number_types) -> NumberVar:
109
91
  """Subtract two numbers.
110
92
 
111
93
  Args:
@@ -119,13 +101,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
119
101
 
120
102
  return number_subtract_operation(self, +other)
121
103
 
122
- @overload
123
- def __rsub__(self, other: number_types) -> NumberVar: ...
124
-
125
- @overload
126
- def __rsub__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
127
-
128
- def __rsub__(self, other: Any):
104
+ def __rsub__(self, other: number_types) -> NumberVar:
129
105
  """Subtract two numbers.
130
106
 
131
107
  Args:
@@ -201,13 +177,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
201
177
 
202
178
  return number_multiply_operation(+other, self)
203
179
 
204
- @overload
205
- def __truediv__(self, other: number_types) -> NumberVar: ...
206
-
207
- @overload
208
- def __truediv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
209
-
210
- def __truediv__(self, other: Any):
180
+ def __truediv__(self, other: number_types) -> NumberVar:
211
181
  """Divide two numbers.
212
182
 
213
183
  Args:
@@ -221,13 +191,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
221
191
 
222
192
  return number_true_division_operation(self, +other)
223
193
 
224
- @overload
225
- def __rtruediv__(self, other: number_types) -> NumberVar: ...
226
-
227
- @overload
228
- def __rtruediv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
229
-
230
- def __rtruediv__(self, other: Any):
194
+ def __rtruediv__(self, other: number_types) -> NumberVar:
231
195
  """Divide two numbers.
232
196
 
233
197
  Args:
@@ -241,13 +205,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
241
205
 
242
206
  return number_true_division_operation(+other, self)
243
207
 
244
- @overload
245
- def __floordiv__(self, other: number_types) -> NumberVar: ...
246
-
247
- @overload
248
- def __floordiv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
249
-
250
- def __floordiv__(self, other: Any):
208
+ def __floordiv__(self, other: number_types) -> NumberVar:
251
209
  """Floor divide two numbers.
252
210
 
253
211
  Args:
@@ -261,13 +219,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
261
219
 
262
220
  return number_floor_division_operation(self, +other)
263
221
 
264
- @overload
265
- def __rfloordiv__(self, other: number_types) -> NumberVar: ...
266
-
267
- @overload
268
- def __rfloordiv__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
269
-
270
- def __rfloordiv__(self, other: Any):
222
+ def __rfloordiv__(self, other: number_types) -> NumberVar:
271
223
  """Floor divide two numbers.
272
224
 
273
225
  Args:
@@ -281,13 +233,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
281
233
 
282
234
  return number_floor_division_operation(+other, self)
283
235
 
284
- @overload
285
- def __mod__(self, other: number_types) -> NumberVar: ...
286
-
287
- @overload
288
- def __mod__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
289
-
290
- def __mod__(self, other: Any):
236
+ def __mod__(self, other: number_types) -> NumberVar:
291
237
  """Modulo two numbers.
292
238
 
293
239
  Args:
@@ -301,13 +247,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
301
247
 
302
248
  return number_modulo_operation(self, +other)
303
249
 
304
- @overload
305
- def __rmod__(self, other: number_types) -> NumberVar: ...
306
-
307
- @overload
308
- def __rmod__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
309
-
310
- def __rmod__(self, other: Any):
250
+ def __rmod__(self, other: number_types) -> NumberVar:
311
251
  """Modulo two numbers.
312
252
 
313
253
  Args:
@@ -321,13 +261,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
321
261
 
322
262
  return number_modulo_operation(+other, self)
323
263
 
324
- @overload
325
- def __pow__(self, other: number_types) -> NumberVar: ...
326
-
327
- @overload
328
- def __pow__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
329
-
330
- def __pow__(self, other: Any):
264
+ def __pow__(self, other: number_types) -> NumberVar:
331
265
  """Exponentiate two numbers.
332
266
 
333
267
  Args:
@@ -341,13 +275,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
341
275
 
342
276
  return number_exponent_operation(self, +other)
343
277
 
344
- @overload
345
- def __rpow__(self, other: number_types) -> NumberVar: ...
346
-
347
- @overload
348
- def __rpow__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
349
-
350
- def __rpow__(self, other: Any):
278
+ def __rpow__(self, other: number_types) -> NumberVar:
351
279
  """Exponentiate two numbers.
352
280
 
353
281
  Args:
@@ -417,13 +345,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
417
345
  """
418
346
  return number_trunc_operation(self)
419
347
 
420
- @overload
421
- def __lt__(self, other: number_types) -> BooleanVar: ...
422
-
423
- @overload
424
- def __lt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
425
-
426
- def __lt__(self, other: Any):
348
+ def __lt__(self, other: number_types) -> BooleanVar:
427
349
  """Less than comparison.
428
350
 
429
351
  Args:
@@ -436,13 +358,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
436
358
  raise_unsupported_operand_types("<", (type(self), type(other)))
437
359
  return less_than_operation(+self, +other)
438
360
 
439
- @overload
440
- def __le__(self, other: number_types) -> BooleanVar: ...
441
-
442
- @overload
443
- def __le__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
444
-
445
- def __le__(self, other: Any):
361
+ def __le__(self, other: number_types) -> BooleanVar:
446
362
  """Less than or equal comparison.
447
363
 
448
364
  Args:
@@ -481,13 +397,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
481
397
  return not_equal_operation(+self, +other)
482
398
  return not_equal_operation(self, other)
483
399
 
484
- @overload
485
- def __gt__(self, other: number_types) -> BooleanVar: ...
486
-
487
- @overload
488
- def __gt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
489
-
490
- def __gt__(self, other: Any):
400
+ def __gt__(self, other: number_types) -> BooleanVar:
491
401
  """Greater than comparison.
492
402
 
493
403
  Args:
@@ -500,13 +410,7 @@ class NumberVar(Var[NUMBER_T], python_types=(int, float)):
500
410
  raise_unsupported_operand_types(">", (type(self), type(other)))
501
411
  return greater_than_operation(+self, +other)
502
412
 
503
- @overload
504
- def __ge__(self, other: number_types) -> BooleanVar: ...
505
-
506
- @overload
507
- def __ge__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
508
-
509
- def __ge__(self, other: Any):
413
+ def __ge__(self, other: number_types) -> BooleanVar:
510
414
  """Greater than or equal comparison.
511
415
 
512
416
  Args:
reflex/vars/sequence.py CHANGED
@@ -14,7 +14,6 @@ from typing import (
14
14
  List,
15
15
  Literal,
16
16
  Mapping,
17
- NoReturn,
18
17
  Sequence,
19
18
  Type,
20
19
  TypeVar,
@@ -76,13 +75,7 @@ VALUE_TYPE = TypeVar("VALUE_TYPE")
76
75
  class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(Sequence, set)):
77
76
  """Base class for immutable array vars."""
78
77
 
79
- @overload
80
- def join(self, sep: StringVar | str = "") -> StringVar: ...
81
-
82
- @overload
83
- def join(self, sep: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
84
-
85
- def join(self, sep: Any = "") -> StringVar:
78
+ def join(self, sep: StringVar | str = "") -> StringVar:
86
79
  """Join the elements of the array.
87
80
 
88
81
  Args:
@@ -123,13 +116,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(Sequence, set)):
123
116
  """
124
117
  return array_reverse_operation(self)
125
118
 
126
- @overload
127
- def __add__(self, other: ArrayVar[ARRAY_VAR_TYPE]) -> ArrayVar[ARRAY_VAR_TYPE]: ...
128
-
129
- @overload
130
- def __add__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
131
-
132
- def __add__(self, other: Any) -> ArrayVar[ARRAY_VAR_TYPE]:
119
+ def __add__(self, other: ArrayVar[ARRAY_VAR_TYPE]) -> ArrayVar[ARRAY_VAR_TYPE]:
133
120
  """Concatenate two arrays.
134
121
 
135
122
  Parameters:
@@ -352,13 +339,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE], python_types=(Sequence, set)):
352
339
  """
353
340
  return array_pluck_operation(self, field)
354
341
 
355
- @overload
356
- def __mul__(self, other: NumberVar | int) -> ArrayVar[ARRAY_VAR_TYPE]: ...
357
-
358
- @overload
359
- def __mul__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
360
-
361
- def __mul__(self, other: Any) -> ArrayVar[ARRAY_VAR_TYPE]:
342
+ def __mul__(self, other: NumberVar | int) -> ArrayVar[ARRAY_VAR_TYPE]:
362
343
  """Multiply the sequence by a number or integer.
363
344
 
364
345
  Parameters:
@@ -603,13 +584,7 @@ STRING_TYPE = TypingExtensionsTypeVar("STRING_TYPE", default=str)
603
584
  class StringVar(Var[STRING_TYPE], python_types=str):
604
585
  """Base class for immutable string vars."""
605
586
 
606
- @overload
607
- def __add__(self, other: StringVar | str) -> ConcatVarOperation: ...
608
-
609
- @overload
610
- def __add__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
611
-
612
- def __add__(self, other: Any) -> ConcatVarOperation:
587
+ def __add__(self, other: StringVar | str) -> ConcatVarOperation:
613
588
  """Concatenate two strings.
614
589
 
615
590
  Args:
@@ -623,13 +598,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
623
598
 
624
599
  return ConcatVarOperation.create(self, other)
625
600
 
626
- @overload
627
- def __radd__(self, other: StringVar | str) -> ConcatVarOperation: ...
628
-
629
- @overload
630
- def __radd__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
631
-
632
- def __radd__(self, other: Any) -> ConcatVarOperation:
601
+ def __radd__(self, other: StringVar | str) -> ConcatVarOperation:
633
602
  """Concatenate two strings.
634
603
 
635
604
  Args:
@@ -643,13 +612,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
643
612
 
644
613
  return ConcatVarOperation.create(other, self)
645
614
 
646
- @overload
647
- def __mul__(self, other: NumberVar | int) -> StringVar: ...
648
-
649
- @overload
650
- def __mul__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
651
-
652
- def __mul__(self, other: Any) -> StringVar:
615
+ def __mul__(self, other: NumberVar | int) -> StringVar:
653
616
  """Multiply the sequence by a number or an integer.
654
617
 
655
618
  Args:
@@ -663,13 +626,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
663
626
 
664
627
  return (self.split() * other).join()
665
628
 
666
- @overload
667
- def __rmul__(self, other: NumberVar | int) -> StringVar: ...
668
-
669
- @overload
670
- def __rmul__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
671
-
672
- def __rmul__(self, other: Any) -> StringVar:
629
+ def __rmul__(self, other: NumberVar | int) -> StringVar:
673
630
  """Multiply the sequence by a number or an integer.
674
631
 
675
632
  Args:
@@ -762,17 +719,9 @@ class StringVar(Var[STRING_TYPE], python_types=str):
762
719
  """
763
720
  return self.split().reverse().join()
764
721
 
765
- @overload
766
722
  def contains(
767
723
  self, other: StringVar | str, field: StringVar | str | None = None
768
- ) -> BooleanVar: ...
769
-
770
- @overload
771
- def contains( # pyright: ignore [reportOverlappingOverload]
772
- self, other: NoReturn, field: StringVar | str | None = None
773
- ) -> NoReturn: ...
774
-
775
- def contains(self, other: Any, field: Any = None) -> BooleanVar:
724
+ ) -> BooleanVar:
776
725
  """Check if the string contains another string.
777
726
 
778
727
  Args:
@@ -790,13 +739,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
790
739
  return string_contains_field_operation(self, other, field)
791
740
  return string_contains_operation(self, other)
792
741
 
793
- @overload
794
- def split(self, separator: StringVar | str = "") -> ArrayVar[list[str]]: ...
795
-
796
- @overload
797
- def split(self, separator: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
798
-
799
- def split(self, separator: Any = "") -> ArrayVar[list[str]]:
742
+ def split(self, separator: StringVar | str = "") -> ArrayVar[list[str]]:
800
743
  """Split the string.
801
744
 
802
745
  Args:
@@ -809,13 +752,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
809
752
  raise_unsupported_operand_types("split", (type(self), type(separator)))
810
753
  return string_split_operation(self, separator)
811
754
 
812
- @overload
813
- def startswith(self, prefix: StringVar | str) -> BooleanVar: ...
814
-
815
- @overload
816
- def startswith(self, prefix: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
817
-
818
- def startswith(self, prefix: Any) -> BooleanVar:
755
+ def startswith(self, prefix: StringVar | str) -> BooleanVar:
819
756
  """Check if the string starts with a prefix.
820
757
 
821
758
  Args:
@@ -828,13 +765,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
828
765
  raise_unsupported_operand_types("startswith", (type(self), type(prefix)))
829
766
  return string_starts_with_operation(self, prefix)
830
767
 
831
- @overload
832
- def endswith(self, suffix: StringVar | str) -> BooleanVar: ...
833
-
834
- @overload
835
- def endswith(self, suffix: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
836
-
837
- def endswith(self, suffix: Any) -> BooleanVar:
768
+ def endswith(self, suffix: StringVar | str) -> BooleanVar:
838
769
  """Check if the string ends with a suffix.
839
770
 
840
771
  Args:
@@ -847,13 +778,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
847
778
  raise_unsupported_operand_types("endswith", (type(self), type(suffix)))
848
779
  return string_ends_with_operation(self, suffix)
849
780
 
850
- @overload
851
- def __lt__(self, other: StringVar | str) -> BooleanVar: ...
852
-
853
- @overload
854
- def __lt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
855
-
856
- def __lt__(self, other: Any):
781
+ def __lt__(self, other: StringVar | str) -> BooleanVar:
857
782
  """Check if the string is less than another string.
858
783
 
859
784
  Args:
@@ -867,13 +792,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
867
792
 
868
793
  return string_lt_operation(self, other)
869
794
 
870
- @overload
871
- def __gt__(self, other: StringVar | str) -> BooleanVar: ...
872
-
873
- @overload
874
- def __gt__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
875
-
876
- def __gt__(self, other: Any):
795
+ def __gt__(self, other: StringVar | str) -> BooleanVar:
877
796
  """Check if the string is greater than another string.
878
797
 
879
798
  Args:
@@ -887,13 +806,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
887
806
 
888
807
  return string_gt_operation(self, other)
889
808
 
890
- @overload
891
- def __le__(self, other: StringVar | str) -> BooleanVar: ...
892
-
893
- @overload
894
- def __le__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
895
-
896
- def __le__(self, other: Any):
809
+ def __le__(self, other: StringVar | str) -> BooleanVar:
897
810
  """Check if the string is less than or equal to another string.
898
811
 
899
812
  Args:
@@ -907,13 +820,7 @@ class StringVar(Var[STRING_TYPE], python_types=str):
907
820
 
908
821
  return string_le_operation(self, other)
909
822
 
910
- @overload
911
- def __ge__(self, other: StringVar | str) -> BooleanVar: ...
912
-
913
- @overload
914
- def __ge__(self, other: NoReturn) -> NoReturn: ... # pyright: ignore [reportOverlappingOverload]
915
-
916
- def __ge__(self, other: Any):
823
+ def __ge__(self, other: StringVar | str) -> BooleanVar:
917
824
  """Check if the string is greater than or equal to another string.
918
825
 
919
826
  Args:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reflex
3
- Version: 0.7.4a1
3
+ Version: 0.7.4a2
4
4
  Summary: Web apps in pure Python.
5
5
  Project-URL: homepage, https://reflex.dev
6
6
  Project-URL: repository, https://github.com/reflex-dev/reflex
@@ -24,6 +24,7 @@ Requires-Dist: charset-normalizer<4.0,>=3.3.2
24
24
  Requires-Dist: distro<2.0,>=1.8.0; platform_system == 'Linux'
25
25
  Requires-Dist: fastapi!=0.111.0,!=0.111.1,>=0.96.0
26
26
  Requires-Dist: granian[reload]>=2.0.0
27
+ Requires-Dist: gunicorn<24.0.0,>=23.0.0
27
28
  Requires-Dist: httpx<1.0,>=0.25.1
28
29
  Requires-Dist: jinja2<4.0,>=3.1.2
29
30
  Requires-Dist: lazy-loader>=0.4
@@ -44,6 +45,7 @@ Requires-Dist: tomlkit<1.0,>=0.12.4
44
45
  Requires-Dist: twine<7.0,>=4.0.0
45
46
  Requires-Dist: typer<1.0,>=0.15.1
46
47
  Requires-Dist: typing-extensions>=4.6.0
48
+ Requires-Dist: uvicorn>=0.20.0
47
49
  Requires-Dist: wheel<1.0,>=0.42.0
48
50
  Requires-Dist: wrapt<2.0,>=1.17.0
49
51
  Description-Content-Type: text/markdown
@@ -2,15 +2,15 @@ reflex/__init__.py,sha256=64HB9b6MKesl3Yv6aZMsozdMKKpgnxirKk-aeN45UYY,10341
2
2
  reflex/__init__.pyi,sha256=j4ZkO-mKKw5dFBhJVbaOg7AlncO-JCckV2cHENPiLG0,11303
3
3
  reflex/__main__.py,sha256=6cVrGEyT3j3tEvlEVUatpaYfbB5EF3UVY-6vc_Z7-hw,108
4
4
  reflex/admin.py,sha256=wu_vYqB0rU2njYBJSI0XZgVEkAFVZNQNUkUUXrlFbZc,343
5
- reflex/app.py,sha256=JCh2PGvwfTpYSfZJeMRANGT-6NdWw718gAFWX-hOq_U,69385
5
+ reflex/app.py,sha256=fQuNKU1zwHBxkO-9OuVA0a3dhnvUxOeT7sghUhiN1R8,69438
6
6
  reflex/assets.py,sha256=PLTKAMYPKMZq8eWXKX8uco6NZ9IiPGWal0bOPLUmU7k,3364
7
- reflex/base.py,sha256=T1sY7SJJOpTsOveEiFxp-K39EoIQtRLgqdFZhsdM0DE,3976
8
- reflex/config.py,sha256=LWl45MJv-fh4fMr-cpQWffO0HgQU-UiMEeqiqJC_Gto,35100
7
+ reflex/base.py,sha256=UuWQkOgZYvJNSIkYuNpb4wp9WtIBXlfmxXARAnOXiZ4,3889
8
+ reflex/config.py,sha256=jVs6nGRQaQR2NPWaixLjbBGxLf1c8Ma6bP5B_GytUpY,35058
9
9
  reflex/event.py,sha256=EX-9X-c8gIudZjRDG8qSrVAbegcaGkYXxLLRWg-7IOA,60758
10
10
  reflex/model.py,sha256=k6qCweATPW1YRB_qcHwa5X35btJmtIlB4zEQ63FaW3w,17527
11
11
  reflex/page.py,sha256=qEt8n5EtawSywCzdsiaNQJWhC8ie-vg8ig0JGuVavPI,2386
12
12
  reflex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- reflex/reflex.py,sha256=BM9oQ4VaobBa__BLgf38DJ2BYhTdobTRDZCpaZkOBHk,20920
13
+ reflex/reflex.py,sha256=ka_BOQTeC3jKwZflM3ka6aijvhFV0hNMzwUmBjH-iSU,21034
14
14
  reflex/route.py,sha256=nn_hJwtQdjiqH_dHXfqMGWKllnyPQZTSR-KWdHDhoOs,4210
15
15
  reflex/state.py,sha256=XBryDsRkXVLxYYiU_TL2B_riU7FySJsg3aU0ywUSWJs,141886
16
16
  reflex/style.py,sha256=dilXPn8de80NzsXT53GPJrmjELC5nPYIlCgongyq1zM,13145
@@ -43,7 +43,7 @@ reflex/.templates/web/.gitignore,sha256=3tT0CtVkCL09D_Y3Hd4myUgGcBuESeavCa0WHU5i
43
43
  reflex/.templates/web/jsconfig.json,sha256=rhQZZRBYxBWclFYTeU6UakzbGveM4qyRQZUpEAVhyqY,118
44
44
  reflex/.templates/web/next.config.js,sha256=ZpGOqo9wHEbt0S08G70VfUNUjFe79UXo7Cde8X8V10E,118
45
45
  reflex/.templates/web/postcss.config.js,sha256=pWczoUW-Y0gYUuHAW4ZK0hQNWTcMC2UGu2i-sQ-YqUs,109
46
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js,sha256=Xx_SdWsxABz3JzWDKxuOkuq87GEXK7DD5sqahPFbEzw,1621
46
+ reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js,sha256=kheF_HclOOabMbqYzdAVbN_EpAGAD26KBLCvJ-Vcu_E,1836
47
47
  reflex/.templates/web/components/shiki/code.js,sha256=UO0hQnm2w1j2VMgj46cnplO6ZLK3p3qhcxp6irjZBxQ,1116
48
48
  reflex/.templates/web/styles/tailwind.css,sha256=wGOoICTy1G0e5bWZ4LYOVgRa3ZT7M44tC4g6CKh6ZPo,112
49
49
  reflex/.templates/web/utils/client_side_routing.js,sha256=cOu4wUHDQtGl1yo5goxljZ94SLZLyr9R3S9Rehcvjio,1475
@@ -58,12 +58,12 @@ reflex/app_mixins/lifespan.py,sha256=fwtaa9NnyENdDa8_RUHUsT8L9qnZKxcpL-mEGLTGldo
58
58
  reflex/app_mixins/middleware.py,sha256=_B33NZdbuI16IUPTENyfCmEfJ6OxFHm6rObl3JdIs-Y,3286
59
59
  reflex/app_mixins/mixin.py,sha256=si0Pa0U1EtJc-a6iZntqU9B7_NrPILwrGFxk9mKHBCE,317
60
60
  reflex/compiler/__init__.py,sha256=r8jqmDSFf09iV2lHlNhfc9XrTLjNxfDNwPYlxS4cmHE,27
61
- reflex/compiler/compiler.py,sha256=Dr7eitYfwfJlcun7v88E7FEELAnkbKp8ja4-r41_6co,25870
61
+ reflex/compiler/compiler.py,sha256=eSDY31pPDtPREI1V75uYYJUwuzTKKQVUJzSmEAyype0,26032
62
62
  reflex/compiler/templates.py,sha256=NX3YUMVGGyDsy2JuDv-AmklMM0pKJHLPsIpdqamgqRQ,5854
63
63
  reflex/compiler/utils.py,sha256=w8KcAXneXQxPOSei7BvAfA9MzR4jQWjDlxm8ahN1UM0,16083
64
64
  reflex/components/__init__.py,sha256=zbIXThv1WPI0FdIGf9G9RAmGoCRoGy7nHcSZ8K5D5bA,624
65
65
  reflex/components/__init__.pyi,sha256=qoj1zIWaitcZOGcJ6k7wuGJk_GAJCE9Xtx8CeRVrvoE,861
66
- reflex/components/component.py,sha256=ksc0Vc3hgZkTEyDZksarETCrjA-pvDMnd7T11F01ecg,88766
66
+ reflex/components/component.py,sha256=ijqgaRi2xuKwrr0xmrnuE8ivFGxMKYop7nIWYNWHSgA,88899
67
67
  reflex/components/dynamic.py,sha256=DdlFbtciytsEbVdFHm-obmE4FFkSR6x2DH0BzYI_4C4,7150
68
68
  reflex/components/literals.py,sha256=hogLnwTJxFJODIvqihg-GD9kFZVsEBDoYzaRit56Nuk,501
69
69
  reflex/components/props.py,sha256=8F2ZNeF16BDiTh-E4F-U_vks41BMJgmkTM7xbjGvfOA,2593
@@ -374,15 +374,15 @@ reflex/utils/compat.py,sha256=aSJH_M6iomgHPQ4onQ153xh1MWqPi3HSYDzE68N6gZM,2635
374
374
  reflex/utils/console.py,sha256=slDTb_5QXfSvdflFiwJauc874R2zqo8BOSh37JUhYLY,9469
375
375
  reflex/utils/decorator.py,sha256=EYdAjPdfgFjqjYSmLlc9qzOYnoihzavG5T4tgVgzsw4,1171
376
376
  reflex/utils/exceptions.py,sha256=Wwu7Ji2xgq521bJKtU2NgjwhmFfnG8erirEVN2h8S-g,8884
377
- reflex/utils/exec.py,sha256=YVYsUYNKSm2uYVGRLNOhC-zQMW7NrGjLmRxmzpTnVfk,19054
377
+ reflex/utils/exec.py,sha256=ASbL7NhicY0NHkNd0Xye8mCxDxkzIgbzf2m1cnGYwks,19262
378
378
  reflex/utils/export.py,sha256=bcJA0L8lBbjij-5PU93ka2c1d_yJqrIurp5u4mN5f68,2537
379
379
  reflex/utils/format.py,sha256=a8em_yzqp9pLTrPXRsdzFWSO1qL2x25BpJXOf9DV1t8,20638
380
380
  reflex/utils/imports.py,sha256=-EkUt9y5U3qmImjfpsXwYh7JI9qJHd_L6X9y12EPJew,3921
381
381
  reflex/utils/lazy_loader.py,sha256=-3DcwIqHNft2fb1ikgDYAMiEwNfbiWfrTBAf1gEVX2o,1367
382
382
  reflex/utils/net.py,sha256=0Yd9OLK8R_px2sqnqrDkTky6hYHtG2pEDvvilOjDfjc,1219
383
383
  reflex/utils/path_ops.py,sha256=idGxUSJRKwYLLi7ppXkq3eV6rvAytJoO-n-FuLkwl3o,7604
384
- reflex/utils/prerequisites.py,sha256=_lgbA4udXoTPgBUYaSRW3zqyHJ3jrObgS7GXrQvgf3M,61526
385
- reflex/utils/processes.py,sha256=B5F8m1smqGCvvwcGBO9poqQddfNBLy7uafO0J0PDcMo,13538
384
+ reflex/utils/prerequisites.py,sha256=OrG1aL-Bvbopkk2Qad4uJMryCG9lDY94C-xlPgQXmd0,63216
385
+ reflex/utils/processes.py,sha256=2_qjTHToBNIn4VCBcivVxjmTvDaiWgDnF7frEmoBjBw,14749
386
386
  reflex/utils/pyi_generator.py,sha256=cKdssbtAtGj2deOSDos9OF96w10qte8JM-TlfbzSdtw,41602
387
387
  reflex/utils/redir.py,sha256=kTqY2WSouF5_ftOe5bnvPEyU3SLpg3pcysTcxFH1UxI,1505
388
388
  reflex/utils/registry.py,sha256=6DPfYc64GodbhwdAZ113_zBsvMNdbFTIJ94qDH1N6wc,1410
@@ -390,15 +390,15 @@ reflex/utils/serializers.py,sha256=K8-erpNIjJNIKif0cDFExa9f5DEVuQUq0j5v5VH6aBI,1
390
390
  reflex/utils/telemetry.py,sha256=qwJBwjdtAV-OGKgO4h-NWhgTvfC3gbduBdn1UB8Ikes,5608
391
391
  reflex/utils/types.py,sha256=nGX44Q_Jp33wIaxf2vxANwBWe1743V2B8RRS8H9yV4c,33449
392
392
  reflex/vars/__init__.py,sha256=2Kv6Oh9g3ISZFESjL1al8KiO7QBZUXmLKGMCBsP-DoY,1243
393
- reflex/vars/base.py,sha256=EjerSG-V8BwXhAcB___I0jNA_0T9t81EUxff7LpjyFg,101870
394
- reflex/vars/datetime.py,sha256=WOEzQF6qjMjYvCat80XxgB_4hmVNHwIIZNMBSmfu0PM,5790
393
+ reflex/vars/base.py,sha256=hD7m4_lwl-l4mK2IfoOCBtLfNBv_aNUgnWYLYj6BYPs,100603
394
+ reflex/vars/datetime.py,sha256=fEc68T0A6XYlAJ3AGteCIb_vDqgoO1O8tpjMzqlp9sc,5104
395
395
  reflex/vars/dep_tracking.py,sha256=kluvF4Pfbpdqf0GcpmYHjT1yP-D1erAzaSQP6qIxjB0,13846
396
396
  reflex/vars/function.py,sha256=2sVnhgetPSwtor8VFtAiYJdzZ9IRNzAKdsUJG6dXQcE,14461
397
- reflex/vars/number.py,sha256=hacFEtv-63tMQN-oeVDWkrLFQL4utYG-b3ahYTb8b4M,29573
397
+ reflex/vars/number.py,sha256=f0AeipAAbBJiHILym4bkJdOGqHnMpwNgQDeV6Lc_7ms,26781
398
398
  reflex/vars/object.py,sha256=-fGqHThozjxAAuQL-wTwEItPiFI-ps53P2bKoSlW_As,17081
399
- reflex/vars/sequence.py,sha256=PzFF1SC6r9iONV3t3nh5GKmToCTEm4B2GL3zGcNerl4,58099
400
- reflex-0.7.4a1.dist-info/METADATA,sha256=Rl6X3yhbKBHSA5mBr88GK3STyGTmV3PSfO4RN78fcyc,12153
401
- reflex-0.7.4a1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
402
- reflex-0.7.4a1.dist-info/entry_points.txt,sha256=Rxt4dXc7MLBNt5CSHTehVPuSe9Xqow4HLX55nD9tQQ0,45
403
- reflex-0.7.4a1.dist-info/licenses/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
404
- reflex-0.7.4a1.dist-info/RECORD,,
399
+ reflex/vars/sequence.py,sha256=S0WvU4gVP7_3WNLttEoaFgUqJRjCQhXT9Auzub04ZmM,55216
400
+ reflex-0.7.4a2.dist-info/METADATA,sha256=_JDqm8r8rcwlxgEEQ1tChLEYJ_jVCKkwwbSpnC5cfRA,12224
401
+ reflex-0.7.4a2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
402
+ reflex-0.7.4a2.dist-info/entry_points.txt,sha256=Rxt4dXc7MLBNt5CSHTehVPuSe9Xqow4HLX55nD9tQQ0,45
403
+ reflex-0.7.4a2.dist-info/licenses/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
404
+ reflex-0.7.4a2.dist-info/RECORD,,