[pygobject] examples: fix new flake8 warnings



commit 6a0f651e9659f11a8e6d8c29abdef10ebe795b9f
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sun Jan 27 10:42:48 2019 +0100

    examples: fix new flake8 warnings

 examples/demo/demos/TreeView/treemodel_filelist.py | 8 ++++----
 examples/demo/demos/TreeView/treemodel_filetree.py | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/examples/demo/demos/TreeView/treemodel_filelist.py 
b/examples/demo/demos/TreeView/treemodel_filelist.py
index f011a470..82e6d95d 100644
--- a/examples/demo/demos/TreeView/treemodel_filelist.py
+++ b/examples/demo/demos/TreeView/treemodel_filelist.py
@@ -125,16 +125,16 @@ class FileListModel(gtk.GenericTreeModel):
         except OSError:
             return None
         mode = filestat.st_mode
-        if column is 0:
+        if column == 0:
             if stat.S_ISDIR(mode):
                 return folderpb
             else:
                 return filepb
-        elif column is 1:
+        elif column == 1:
             return rowref
-        elif column is 2:
+        elif column == 2:
             return filestat.st_size
-        elif column is 3:
+        elif column == 3:
             return oct(stat.S_IMODE(mode))
         return time.ctime(filestat.st_mtime)
 
diff --git a/examples/demo/demos/TreeView/treemodel_filetree.py 
b/examples/demo/demos/TreeView/treemodel_filetree.py
index 3b43190f..eb8e2b9a 100644
--- a/examples/demo/demos/TreeView/treemodel_filetree.py
+++ b/examples/demo/demos/TreeView/treemodel_filetree.py
@@ -157,16 +157,16 @@ class FileTreeModel(gtk.GenericTreeModel):
         except OSError:
             return None
         mode = filestat.st_mode
-        if column is 0:
+        if column == 0:
             if stat.S_ISDIR(mode):
                 return folderpb
             else:
                 return filepb
-        elif column is 1:
+        elif column == 1:
             return os.path.basename(relpath)
-        elif column is 2:
+        elif column == 2:
             return filestat.st_size
-        elif column is 3:
+        elif column == 3:
             return oct(stat.S_IMODE(mode))
         return time.ctime(filestat.st_mtime)
 


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