projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Used isort to sort imports. Also added to the git pre-commit hook.
[python_utils.git]
/
base_presence.py
diff --git
a/base_presence.py
b/base_presence.py
index 612193e1df3b84f0ee8fc52b86ab5c94ce7ee38d..ad852f9f7ebce82d5a76c6d7f1436a78670489e7 100755
(executable)
--- a/
base_presence.py
+++ b/
base_presence.py
@@
-1,20
+1,19
@@
#!/usr/bin/env python3
import datetime
#!/usr/bin/env python3
import datetime
-from collections import defaultdict
import logging
import re
import logging
import re
-from typing import Dict, List, Set
import warnings
import warnings
+from collections import defaultdict
+from typing import Dict, List, Optional, Set
# Note: this module is fairly early loaded. Be aware of dependencies.
import argparse_utils
import bootstrap
import config
# Note: this module is fairly early loaded. Be aware of dependencies.
import argparse_utils
import bootstrap
import config
+import site_config
from type.locations import Location
from type.people import Person
from type.locations import Location
from type.people import Person
-import site_config
-
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
@@
-75,7
+74,7
@@
class PresenceDetection(object):
] = defaultdict(dict)
self.names_by_mac: Dict[str, str] = {}
self.dark_locations: Set[Location] = set()
] = defaultdict(dict)
self.names_by_mac: Dict[str, str] = {}
self.dark_locations: Set[Location] = set()
- self.last_update = None
+ self.last_update
: Optional[datetime.datetime]
= None
def maybe_update(self) -> None:
if self.last_update is None:
def maybe_update(self) -> None:
if self.last_update is None: