File: 001-fix-syntaxwarning.patch

package info (click to toggle)
python-pubchempy 1.0.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 388 kB
  • sloc: python: 1,377; makefile: 147
file content (17 lines) | stat: -rw-r--r-- 548 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix for Syntax Warning
 Replace 'is not comparison with an integer literal (0)' with '!= 0'.
Forwarded: not-needed
Author: Yogeswaran Umasankar <yogu@debian.org>
Last-Update: 2024-11-10

--- a/pubchempy.py
+++ b/pubchempy.py
@@ -560,7 +560,7 @@ class Atom(object):
         for coord in {'x', 'y', 'z'}:
             if getattr(self, coord) is not None:
                 data[coord] = getattr(self, coord)
-        if self.charge is not 0:
+        if self.charge != 0:
             data['charge'] = self.charge
         return data