Skip to content

Commit 56a0c32

Browse files
committed
chore: Remove unneeded decorator
1 parent 3c58537 commit 56a0c32

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

src/pan3d/custom/contour.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,16 @@
2828
from pan3d.utils.convert import to_float, to_image
2929
from pan3d.utils.presets import PRESETS, set_preset
3030
from pan3d.widgets.pan3d_view import Pan3DView
31-
from trame.app import get_server
32-
from trame.decorators import TrameApp, change
31+
from trame.app import TrameApp
32+
from trame.decorators import change
3333
from trame.ui.vuetify3 import VAppLayout
3434
from trame.widgets import html
3535
from trame.widgets import vuetify3 as v3
3636

3737

38-
@TrameApp()
39-
class ContourExplorer:
38+
class ContourExplorer(TrameApp):
4039
def __init__(self, server=None, local_rendering=None):
41-
self.server = get_server(server, client_type="vue3")
40+
super().__init__(server, client_type="vue3")
4241
self.server.enable_module(base)
4342
self.server.enable_module(preview)
4443

src/pan3d/ui/analytics.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22

3-
from trame.decorators import TrameApp, change
3+
from trame.decorators import change
44
from trame.widgets import html, plotly
55
from trame.widgets import vuetify3 as v3
66

@@ -68,7 +68,6 @@ class GroupBy(Enum):
6868
}
6969

7070

71-
@TrameApp()
7271
class Plotting(v3.VCard):
7372
def __init__(
7473
self,

src/pan3d/viewers/catalog.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77
from pan3d import catalogs as pan3d_catalogs
88
from pan3d.ui.catalog_search import CatalogSearch
99
from pan3d.xarray.algorithm import vtkXArrayRectilinearSource
10-
from trame.app import get_server
11-
from trame.decorators import TrameApp, change
10+
from trame.app import TrameApp
11+
from trame.decorators import change
1212
from trame.ui.vuetify3 import SinglePageWithDrawerLayout
1313
from trame.widgets import html
1414
from trame.widgets import vuetify3 as v3
1515

1616

17-
@TrameApp()
18-
class CatalogBrowser:
17+
class CatalogBrowser(TrameApp):
1918
def __init__(self, server=None):
20-
self.server = get_server(server)
19+
super().__init__(server, client_type="vue3")
2120
self.current_event_loop = asyncio.get_event_loop()
2221

2322
# dev setup

0 commit comments

Comments
 (0)