Преглед изворни кода

Reformat with latest version of black

There have been some formatting changes in the latest black, which are
causing lint failures.
Jason Rumney пре 3 година
родитељ
комит
d5d97f7ba9

+ 1 - 2
custom_components/tuya_local/helpers/device_config.py

@@ -518,7 +518,6 @@ class TuyaDpsConfig:
             except ValueError:
                 self.stringify = False
         else:
-
             self.stringify = False
 
         result = value
@@ -740,7 +739,7 @@ def available_configs():
     """List the available config files."""
     _CONFIG_DIR = dirname(config_dir.__file__)
 
-    for (path, dirs, files) in walk(_CONFIG_DIR):
+    for path, dirs, files in walk(_CONFIG_DIR):
         for basename in sorted(files):
             if fnmatch(basename, "*.yaml"):
                 yield basename

+ 0 - 1
tests/test_device.py

@@ -275,7 +275,6 @@ class TestDevice(IsolatedAsyncioTestCase):
         self.assertIs(self.subject.get_property("2"), None)
 
     async def test_async_set_property_sends_to_api(self):
-
         await self.subject.async_set_property("1", False)
 
         self.mock_api().send.assert_called_once()

+ 1 - 4
tests/test_translations.py

@@ -5,9 +5,6 @@ from fnmatch import fnmatch
 from os import walk
 from os.path import join, dirname
 
-import pytest
-from unittest import TestCase
-
 from homeassistant.util.json import load_json
 
 import custom_components.tuya_local as root
@@ -19,7 +16,7 @@ from custom_components.tuya_local.helpers.device_config import (
 
 def get_translations():
     translations = join(dirname(root.__file__), "translations")
-    for (path, dirs, files) in walk(translations):
+    for path, dirs, files in walk(translations):
         for file in files:
             if fnmatch(file, "*.json"):
                 yield load_json(join(path, file))