Repository: amogorkon/justuse (language: python)

Issue:
Mass testing with 80.5% pass



Discussion / hints:

Fix patch:
diff --git a/src/use/use.py b/src/use/use.py
index c461f0bf..25634e4d 100755
--- a/src/use/use.py
+++ b/src/use/use.py
@@ -1289,7 +1289,7 @@ def _is_platform_compatible(
         return False
     if "platform_tag" not in info or "python_version" not in info:
         info.update(_parse_filename(URL(info["url"]).path.segments[-1]))
-    if info["platform_tag"] == None:
+    if info["platform_tag"] is None:
         info["platforn_tag"] = "any"
     if not include_sdist and (
         ".tar" in info["filename"]


Test patch:
diff --git a/tests/mass/use.py b/tests/mass/use.py
index 4369e7b9..1a16eb47 100755
--- a/tests/mass/use.py
+++ b/tests/mass/use.py
@@ -1136,9 +1136,8 @@ def _filtered_by_version(data: PyPI_Project, version: Version) -> PyPI_Project:
     if filtered["releases"]:
         if "VERBOSE" in os.environ:
             log.debug("return PyPI_Project(**%s)", repr(filtered))
-        r = PyPI_Project(**filtered)
         # print("return r = %s" % r)
-        return r
+        return PyPI_Project(**filtered)
     return PyPI_Project(**filtered)
 
 
@@ -1173,9 +1172,8 @@ def _filtered_by_platform(data: PyPI_Project, *, tags: FrozenSet[PlatformTag], s
         if filtered["releases"]:
             if "VERBOSE" in os.environ:
                 log.debug("return PyPI_Project(**%s)", repr(filtered))
-            r = PyPI_Project(**filtered)
             # print("return r = %s" % r)
-            return r
+            return PyPI_Project(**filtered)
     return PyPI_Project(**filtered)
 
 
@@ -1217,7 +1215,7 @@ def _is_platform_compatible(
         return False
     if "platform_tag" not in info or "python_version" not in info:
         info.update(_parse_filename(URL(info["url"]).path.segments[-1]))
-    if info["platform_tag"] == None:
+    if info["platform_tag"] is None:
         info["platforn_tag"] = "any"
     if not include_sdist and (
         ".tar" in info["filename"] or info.get("python_tag", "cpsource") in ("cpsource", "sdist")