mirror of
https://github.com/elisspace/core.git
synced 2026-10-05 08:46:29 +00:00
Bring back typing check. Meanwhile just for homeassistant/*.py (#14410)
* Bring back typing check. Meanwhile just for homeassistant/.py * Change follow-imports to silent. Add a few more checks.
This commit is contained in:
+3
-3
@@ -24,7 +24,7 @@ logging.basicConfig(level=logging.INFO)
|
||||
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
||||
|
||||
|
||||
def test_real(func):
|
||||
def check_real(func):
|
||||
"""Force a function to require a keyword _test_real to be passed in."""
|
||||
@functools.wraps(func)
|
||||
def guard_func(*args, **kwargs):
|
||||
@@ -40,8 +40,8 @@ def test_real(func):
|
||||
|
||||
|
||||
# Guard a few functions that would make network connections
|
||||
location.detect_location_info = test_real(location.detect_location_info)
|
||||
location.elevation = test_real(location.elevation)
|
||||
location.detect_location_info = check_real(location.detect_location_info)
|
||||
location.elevation = check_real(location.elevation)
|
||||
util.get_local_ip = lambda: '127.0.0.1'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user