[gimp] Comparision to None should be done with "is" or "is not"



commit 09d1a3c82f60d097fcf71d4aeba197b27da7788f
Author: Michal <m powalko gmail com>
Date:   Mon Sep 17 14:35:30 2018 +0200

    Comparision to None should be done with "is" or "is not"
    
    https://www.python.org/dev/peps/pep-0008/#programming-recommendations

 build/windows/jhbuild/makepkgs.py      | 2 +-
 plug-ins/pygimp/plug-ins/whirlpinch.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/build/windows/jhbuild/makepkgs.py b/build/windows/jhbuild/makepkgs.py
index c0729dd630..ac794bf243 100755
--- a/build/windows/jhbuild/makepkgs.py
+++ b/build/windows/jhbuild/makepkgs.py
@@ -109,7 +109,7 @@ def main ():
 
     scriptdir_loc = os.path.dirname (os.path.realpath (__file__))
     targets_loc = os.path.join (scriptdir_loc, "targets")
-    if packages_loc == None:
+    if packages_loc is None:
         packages_loc = os.path.join (targets_loc, "packages")
 
     run (targets_loc, packages_loc)
diff --git a/plug-ins/pygimp/plug-ins/whirlpinch.py b/plug-ins/pygimp/plug-ins/whirlpinch.py
index 606485ada7..a874ff1e75 100755
--- a/plug-ins/pygimp/plug-ins/whirlpinch.py
+++ b/plug-ins/pygimp/plug-ins/whirlpinch.py
@@ -52,7 +52,7 @@ class pixel_fetcher:
                 row = y / self.tile_height
                 rowoff = y % self.tile_height
 
-                if col != self.col or row != self.row or self.tile == None:
+                if col != self.col or row != self.row or self.tile is None:
                         self.tile = self.drawable.get_tile(False, row, col)
                         self.col = col
                         self.row = row


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]