Bladeren bron

Utils: revert change to use relative imports

Unless the path is not properly set up, relative paths cause error.
Since we don't have HomeAssistant properly setting things up in the
dev environment for command line utils, using absolute paths is more
resilient.
Jason Rumney 1 jaar geleden
bovenliggende
commit
221b883e41
4 gewijzigde bestanden met toevoegingen van 4 en 8 verwijderingen
  1. 1 2
      util/best_match.py
  2. 1 2
      util/config_match.py
  3. 1 2
      util/duplicates.py
  4. 1 2
      util/match_against.py

+ 1 - 2
util/best_match.py

@@ -3,10 +3,9 @@
 import json
 import sys
 
+from common_funcs import FakeDevice
 from custom_components.tuya_local.helpers.device_config import possible_matches
 
-from .common_funcs import FakeDevice
-
 
 def main() -> int:
     dps = json.loads(" ".join(sys.argv[1:]))

+ 1 - 2
util/config_match.py

@@ -3,10 +3,9 @@
 import json
 import sys
 
+from common_funcs import FakeDevice
 from custom_components.tuya_local.helpers.device_config import possible_matches
 
-from .common_funcs import FakeDevice
-
 
 def main() -> int:
     dps = json.loads(" ".join(sys.argv[1:]))

+ 1 - 2
util/duplicates.py

@@ -2,10 +2,9 @@
 
 import sys
 
+from common_funcs import load_config, make_sample_dps
 from custom_components.tuya_local.helpers.device_config import possible_matches
 
-from .common_funcs import load_config, make_sample_dps
-
 
 def main():
     for filename in sys.argv[1:]:

+ 1 - 2
util/match_against.py

@@ -3,10 +3,9 @@
 import json
 import sys
 
+from common_funcs import FakeDevice, load_config
 from custom_components.tuya_local.helpers.device_config import _typematch
 
-from .common_funcs import FakeDevice, load_config
-
 
 def main() -> int:
     dps = json.loads(" ".join(sys.argv[2:]))