labscript-suite / labscript

The 𝗹𝗮𝗯𝘀𝗰𝗿𝗶𝗽𝘁 library provides a translation from expressive Python code to low-level hardware instructions.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
9 stars 48 forks source link

Syntax warnings #56

Closed chrisjbillington closed 4 years ago

chrisjbillington commented 4 years ago

Python 3.8 became more aggressive about syntax warnings.

These comparisons do not cause issues since small integers are singletons in CPython, but they should be fixed nonetheless.

/home/bilbo/venvs/labscript/labscript.git/labscript/labscript.py:116: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if arrays[0] is 0:
/home/bilbo/venvs/labscript/labscript.git/labscript/labscript.py:1134: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if not isinstance(limits,tuple) or len(limits) is not 2:
chrisjbillington commented 4 years ago

Fixed by #68