mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2025-06-28 18:25:12 +00:00
Rename LazyInitialise to make IDEs recognise it as a property
This commit is contained in:
@ -3,11 +3,11 @@
|
||||
|
||||
from functools import partial
|
||||
|
||||
from tfw.decorators import LazyInitialise
|
||||
from tfw.decorators import lazy_property
|
||||
|
||||
|
||||
class CallbackMixin:
|
||||
@LazyInitialise
|
||||
@lazy_property
|
||||
def _callbacks(self):
|
||||
return []
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
from watchdog.observers import Observer
|
||||
|
||||
from tfw.decorators import LazyInitialise
|
||||
from tfw.decorators import lazy_property
|
||||
|
||||
|
||||
class ObserverMixin:
|
||||
@LazyInitialise
|
||||
@lazy_property
|
||||
def observer(self):
|
||||
return Observer()
|
||||
|
||||
|
@ -6,12 +6,12 @@ from xmlrpc.client import Fault as SupervisorFault
|
||||
from contextlib import suppress
|
||||
from os import remove
|
||||
|
||||
from tfw.decorators import LazyInitialise
|
||||
from tfw.decorators import lazy_property
|
||||
from tfw.config import TFWENV
|
||||
|
||||
|
||||
class SupervisorBaseMixin:
|
||||
@LazyInitialise
|
||||
@lazy_property
|
||||
def supervisor(self):
|
||||
return xmlrpc.client.ServerProxy(TFWENV.SUPERVISOR_HTTP_URI).supervisor
|
||||
|
||||
|
Reference in New Issue
Block a user