Skip to content

Commit 31b6262

Browse files
keep run.py in nicegui module
1 parent 43277b7 commit 31b6262

File tree

6 files changed

+5
-11
lines changed

6 files changed

+5
-11
lines changed

nicegui/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def __add__(self, other):
3232
sys.modules['nicegui.binding'] = WhateverModule('nicegui.binding')
3333
sys.modules['nicegui.elements'] = WhateverModule('nicegui.elements')
3434
sys.modules['nicegui.html'] = WhateverModule('nicegui.html')
35+
# NOTE: keep importing the run module
3536
sys.modules['nicegui.storage'] = WhateverModule('nicegui.storage')
3637
sys.modules['nicegui.ui'] = WhateverModule('nicegui.ui')
3738
sys.modules['nicegui.api_router'] = WhateverModule('nicegui.api_router')
@@ -43,9 +44,7 @@ def __add__(self, other):
4344
sys.modules['nicegui.tailwind'] = WhateverModule('nicegui.tailwind')
4445
sys.modules['nicegui.version'] = WhateverModule('nicegui.version')
4546

46-
from nicegui_run import run
47-
48-
from . import binding, elements, html, storage, ui
47+
from . import binding, elements, html, run, storage, ui
4948
from .api_router import APIRouter
5049
from .app.app import App
5150
from .client import Client

nicegui/native/native.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from multiprocessing import Queue
55
from typing import Any, Callable, Tuple
66

7-
from nicegui_run import run
8-
7+
from .. import run
98
from ..logging import log
109

1110
method_queue: Queue = Queue()

nicegui/nicegui.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
from fastapi import HTTPException, Request
1010
from fastapi.responses import FileResponse, Response
1111

12-
from nicegui_run import run
13-
14-
from . import air, background_tasks, binding, core, favicon, helpers, json, welcome
12+
from . import air, background_tasks, binding, core, favicon, helpers, json, run, welcome
1513
from .app import App
1614
from .client import Client
1715
from .dependencies import js_components, libraries, resources

nicegui_run/run.py nicegui/run.py

File renamed without changes.

nicegui/welcome.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
import ifaddr
55

6-
from nicegui_run import run
7-
8-
from . import core
6+
from . import core, run
97

108

119
def _get_all_ips() -> List[str]:

nicegui_run/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)