mirror of
https://github.com/rio-labs/rio.git
synced 2026-02-10 23:59:10 -06:00
fixed example refactoring
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import dataclasses
|
||||
|
||||
# <additional-imports>
|
||||
from pathlib import Path
|
||||
|
||||
@@ -39,7 +37,7 @@ class DashboardPage(rio.Component):
|
||||
"""
|
||||
|
||||
fetch_data_from_api: bool = False
|
||||
coin_data: pd.DataFrame = dataclasses.field(
|
||||
coin_data: pd.DataFrame = field(
|
||||
default=pd.DataFrame(
|
||||
{
|
||||
"date": np.zeros(5),
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
|
||||
# <additional-imports>
|
||||
import datetime
|
||||
|
||||
@@ -26,7 +24,7 @@ class NewTodoItemInput(rio.Component):
|
||||
# This is a private field that we need for an attribute binding. We don't
|
||||
# want to create a constructor parameter for this field, so we set
|
||||
# `init=False`.
|
||||
_title: str = dataclasses.field(init=False, default="")
|
||||
_title: str = field(init=False, default="")
|
||||
|
||||
async def _on_confirm(
|
||||
self, _: rio.TextInputConfirmEvent | None = None
|
||||
|
||||
Reference in New Issue
Block a user