src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py

branch
eric7
changeset 10119
64147a7e6393
parent 10085
b5808c3a9967
child 10122
f9b87800ecf2
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py	Thu Jul 20 10:36:23 2023 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py	Thu Jul 20 11:00:30 2023 +0200
@@ -1354,11 +1354,8 @@
         @param node reference to the bytes node
         @type ast.Constant
         """
-        if sys.version_info >= (3, 8, 0):
-            if AstUtilities.isBaseString(node):
-                self.__addNode(node)
-            else:
-                super().generic_visit(node)
+        if AstUtilities.isBaseString(node):
+            self.__addNode(node)
         else:
             super().generic_visit(node)
 
@@ -2429,27 +2426,18 @@
                 continue
 
             if (
-                sys.version_info < (3, 8, 0)
-                and isinstance(
+                isinstance(
                     subnode.value,
-                    (ast.Num, ast.Bytes, ast.NameConstant, ast.List, ast.Set, ast.Dict),
+                    (ast.List, ast.Set, ast.Dict),
                 )
-            ) or (
-                sys.version_info >= (3, 8, 0)
-                and (
-                    isinstance(
-                        subnode.value,
-                        (ast.List, ast.Set, ast.Dict),
-                    )
-                    or (
-                        isinstance(subnode.value, ast.Constant)
-                        and (
-                            isinstance(
-                                subnode.value.value,
-                                (int, float, complex, bytes, bool),
-                            )
-                            or subnode.value.value is None
+                or (
+                    isinstance(subnode.value, ast.Constant)
+                    and (
+                        isinstance(
+                            subnode.value.value,
+                            (int, float, complex, bytes, bool),
                         )
+                        or subnode.value.value is None
                     )
                 )
             ):

eric ide

mercurial