projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bunch of changes...
[python_utils.git]
/
site_config.py
diff --git
a/site_config.py
b/site_config.py
index 2d0c4c3f866c748027ccc5ab84f15d2b0f26d554..caaf3d8c1c49d9e3d26e5ab8efde06c8461808a7 100644
(file)
--- a/
site_config.py
+++ b/
site_config.py
@@
-7,7
+7,7
@@
from typing import Callable
# Note: this module is fairly early loaded. Be aware of dependencies.
import config
# Note: this module is fairly early loaded. Be aware of dependencies.
import config
-from locations import Location
+from
type.
locations import Location
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
@@
-21,7
+21,7
@@
args.add_argument(
const='NONE',
nargs='?',
choices=('HOUSE', 'CABIN', 'NONE'),
const='NONE',
nargs='?',
choices=('HOUSE', 'CABIN', 'NONE'),
- help='Where are we, HOUSE, CABIN?',
+ help='Where are we, HOUSE, CABIN?
Overrides standard detection code.
',
)
)
@@
-33,7
+33,7
@@
class SiteConfig(object):
network_netmask: str
network_router_ip: str
presence_location: Location
network_netmask: str
network_router_ip: str
presence_location: Location
- is_anyone_present: Callable
[None, bool]
+ is_anyone_present: Callable
arper_minimum_device_count: int
arper_minimum_device_count: int
@@
-53,7
+53,7
@@
def get_location():
"""
Returns location as an enum instead of a string.
"""
Returns location as an enum instead of a string.
- >>> from locations import Location
+ >>> from
type.
locations import Location
>>> location = get_location()
>>> location == Location.HOUSE or location == Location.CABIN
True
>>> location = get_location()
>>> location == Location.HOUSE or location == Location.CABIN
True
@@
-63,8
+63,8
@@
def get_location():
def is_anyone_present_wrapper(location: Location):
def is_anyone_present_wrapper(location: Location):
- import presence
- p = presence.PresenceDetection()
+ import
base_
presence
+ p =
base_
presence.PresenceDetection()
return p.is_anyone_in_location_now(location)
return p.is_anyone_in_location_now(location)