Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace CRLF to LF #8

Merged
merged 2 commits into from
May 17, 2024
Merged

replace CRLF to LF #8

merged 2 commits into from
May 17, 2024

Conversation

wuwentao
Copy link
Owner

replace fille with CRLF to LF
once it done ,will merge this changes to #1 , and do code review for linter changes.
as CRLF to LF changes have too many file changes and hard to do code review.

@wuwentao
Copy link
Owner Author

there is no any code changes and only update all the files with CRLF to LF.
just merge it and for future works.

@wuwentao
Copy link
Owner Author

there is an CodeQL error with enum import itself.

solution:

  1. rename backports/enum.py to backports/myenum.py
  2. update all the local import ,changes diff as below
diff --git a/custom_components/midea_ac_lan/midea/core/device.py b/custom_components/midea_ac_lan/midea/core/device.py
index f9d95c8..1eaa24f 100644
--- a/custom_components/midea_ac_lan/midea/core/device.py
+++ b/custom_components/midea_ac_lan/midea/core/device.py
@@ -2,7 +2,7 @@ import threading
 try:
     from enum import StrEnum
 except ImportError:
-    from ..backports.enum import StrEnum
+    from ..backports.myenum import StrEnum
 from enum import IntEnum
 from .security import LocalSecurity, MSGTYPE_HANDSHAKE_REQUEST, MSGTYPE_ENCRYPTED_REQUEST
 from .packet_builder import PacketBuilder
diff --git a/custom_components/midea_ac_lan/midea/devices/a1/device.py b/custom_components/midea_ac_lan/midea/devices/a1/device.py
index d8b708f..4cc990a 100644
--- a/custom_components/midea_ac_lan/midea/devices/a1/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/a1/device.py
@@ -7,7 +7,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/ac/device.py b/custom_components/midea_ac_lan/midea/devices/ac/device.py
index 220335b..977c605 100644
--- a/custom_components/midea_ac_lan/midea/devices/ac/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/ac/device.py
@@ -14,7 +14,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/b0/device.py b/custom_components/midea_ac_lan/midea/devices/b0/device.py
index 4bfee5a..c1f5f6e 100644
--- a/custom_components/midea_ac_lan/midea/devices/b0/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/b0/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/b1/device.py b/custom_components/midea_ac_lan/midea/devices/b1/device.py
index cd030cd..4f62e6a 100644
--- a/custom_components/midea_ac_lan/midea/devices/b1/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/b1/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/b3/device.py b/custom_components/midea_ac_lan/midea/devices/b3/device.py
index 3d26da0..41fe63c 100644
--- a/custom_components/midea_ac_lan/midea/devices/b3/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/b3/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/b4/device.py b/custom_components/midea_ac_lan/midea/devices/b4/device.py
index 41b1976..56e53d6 100644
--- a/custom_components/midea_ac_lan/midea/devices/b4/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/b4/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/b6/device.py b/custom_components/midea_ac_lan/midea/devices/b6/device.py
index 325db06..c9d68a1 100644
--- a/custom_components/midea_ac_lan/midea/devices/b6/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/b6/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/bf/device.py b/custom_components/midea_ac_lan/midea/devices/bf/device.py
index 2f0b568..225cba8 100644
--- a/custom_components/midea_ac_lan/midea/devices/bf/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/bf/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/c2/device.py b/custom_components/midea_ac_lan/midea/devices/c2/device.py
index e41bcb7..580f4b9 100644
--- a/custom_components/midea_ac_lan/midea/devices/c2/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/c2/device.py
@@ -9,7 +9,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/c3/device.py b/custom_components/midea_ac_lan/midea/devices/c3/device.py
index 7dc3969..cc8ba68 100644
--- a/custom_components/midea_ac_lan/midea/devices/c3/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/c3/device.py
@@ -9,7 +9,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/ca/device.py b/custom_components/midea_ac_lan/midea/devices/ca/device.py
index b2a0e60..8d05ad6 100644
--- a/custom_components/midea_ac_lan/midea/devices/ca/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/ca/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/cc/device.py b/custom_components/midea_ac_lan/midea/devices/cc/device.py
index 70bd471..a82a5fb 100644
--- a/custom_components/midea_ac_lan/midea/devices/cc/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/cc/device.py
@@ -7,7 +7,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/cd/device.py b/custom_components/midea_ac_lan/midea/devices/cd/device.py
index 917a00b..8de65e5 100644
--- a/custom_components/midea_ac_lan/midea/devices/cd/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/cd/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/ce/device.py b/custom_components/midea_ac_lan/midea/devices/ce/device.py
index a4e394b..f040e27 100644
--- a/custom_components/midea_ac_lan/midea/devices/ce/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/ce/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/cf/device.py b/custom_components/midea_ac_lan/midea/devices/cf/device.py
index 12a5987..273e397 100644
--- a/custom_components/midea_ac_lan/midea/devices/cf/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/cf/device.py
@@ -7,7 +7,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/da/device.py b/custom_components/midea_ac_lan/midea/devices/da/device.py
index 1979abe..305b7bb 100644
--- a/custom_components/midea_ac_lan/midea/devices/da/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/da/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/db/device.py b/custom_components/midea_ac_lan/midea/devices/db/device.py
index 9288c75..0ef737c 100644
--- a/custom_components/midea_ac_lan/midea/devices/db/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/db/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/dc/device.py b/custom_components/midea_ac_lan/midea/devices/dc/device.py
index 9b6282e..b78c121 100644
--- a/custom_components/midea_ac_lan/midea/devices/dc/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/dc/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/e1/device.py b/custom_components/midea_ac_lan/midea/devices/e1/device.py
index 21a2674..afc3d4c 100644
--- a/custom_components/midea_ac_lan/midea/devices/e1/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/e1/device.py
@@ -9,7 +9,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/e2/device.py b/custom_components/midea_ac_lan/midea/devices/e2/device.py
index dfa46fb..fc8ca31 100644
--- a/custom_components/midea_ac_lan/midea/devices/e2/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/e2/device.py
@@ -10,7 +10,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/e3/device.py b/custom_components/midea_ac_lan/midea/devices/e3/device.py
index ebd8a10..0b708f0 100644
--- a/custom_components/midea_ac_lan/midea/devices/e3/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/e3/device.py
@@ -10,7 +10,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/e6/device.py b/custom_components/midea_ac_lan/midea/devices/e6/device.py
index 7510966..951125d 100644
--- a/custom_components/midea_ac_lan/midea/devices/e6/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/e6/device.py
@@ -7,7 +7,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/e8/device.py b/custom_components/midea_ac_lan/midea/devices/e8/device.py
index c479e37..abaaada 100644
--- a/custom_components/midea_ac_lan/midea/devices/e8/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/e8/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/ea/device.py b/custom_components/midea_ac_lan/midea/devices/ea/device.py
index b5d22fc..aa4fbc4 100644
--- a/custom_components/midea_ac_lan/midea/devices/ea/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/ea/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/ec/device.py b/custom_components/midea_ac_lan/midea/devices/ec/device.py
index 2bc71ec..c6eed5b 100644
--- a/custom_components/midea_ac_lan/midea/devices/ec/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/ec/device.py
@@ -6,7 +6,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/ed/device.py b/custom_components/midea_ac_lan/midea/devices/ed/device.py
index 68903f6..4aa1e4f 100644
--- a/custom_components/midea_ac_lan/midea/devices/ed/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/ed/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/fa/device.py b/custom_components/midea_ac_lan/midea/devices/fa/device.py
index c4c47ae..58dea3e 100644
--- a/custom_components/midea_ac_lan/midea/devices/fa/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/fa/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/fb/device.py b/custom_components/midea_ac_lan/midea/devices/fb/device.py
index 7465eb4..c7b614a 100644
--- a/custom_components/midea_ac_lan/midea/devices/fb/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/fb/device.py
@@ -7,7 +7,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/fc/device.py b/custom_components/midea_ac_lan/midea/devices/fc/device.py
index 2f55265..e428251 100644
--- a/custom_components/midea_ac_lan/midea/devices/fc/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/fc/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/fd/device.py b/custom_components/midea_ac_lan/midea/devices/fd/device.py
index 771533f..b3f010f 100644
--- a/custom_components/midea_ac_lan/midea/devices/fd/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/fd/device.py
@@ -7,7 +7,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/x13/device.py b/custom_components/midea_ac_lan/midea/devices/x13/device.py
index 2a4e1e1..50843ec 100644
--- a/custom_components/midea_ac_lan/midea/devices/x13/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/x13/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/x26/device.py b/custom_components/midea_ac_lan/midea/devices/x26/device.py
index 5a4408f..2230154 100644
--- a/custom_components/midea_ac_lan/midea/devices/x26/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/x26/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/x34/device.py b/custom_components/midea_ac_lan/midea/devices/x34/device.py
index 6097128..a1cb1ef 100644
--- a/custom_components/midea_ac_lan/midea/devices/x34/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/x34/device.py
@@ -9,7 +9,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)
diff --git a/custom_components/midea_ac_lan/midea/devices/x40/device.py b/custom_components/midea_ac_lan/midea/devices/x40/device.py
index b49a0bc..f7d33fd 100644
--- a/custom_components/midea_ac_lan/midea/devices/x40/device.py
+++ b/custom_components/midea_ac_lan/midea/devices/x40/device.py
@@ -8,7 +8,7 @@ from .message import (
 try:
     from enum import StrEnum
 except ImportError:
-    from ...backports.enum import StrEnum
+    from ...backports.myenum import StrEnum
 from ...core.device import MiedaDevice

 _LOGGER = logging.getLogger(__name__)

@wuwentao wuwentao merged commit 2c3760c into master May 17, 2024
4 checks passed
@wuwentao wuwentao deleted the crlf_to_lf branch May 17, 2024 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant