FreeYourSoul / FSeam

Cpp header only library to manage compile time mock class generated via Python script
MIT License
86 stars 8 forks source link

Python scripts: SyntaxWarnings in comparisons in Python3 #27

Closed jenisys closed 4 years ago

jenisys commented 4 years ago

Describe the bug FSeam python scripts cause various Python3 syntax warnings in comparisons related to:

AFFECTED FILES:

To Reproduce Steps to reproduce the behavior:

  1. Install FSeam project as package with cmake to CMAKE_INSTALL_PREFIX=/usr/local
  2. Use FSeam_tutorial project and build it with cmake
  3. The following Python SyntaxWarnings occur during cmake build phase:
$ cmake --build .
[4/32] Generating FSEAM code for /.../FSeam_tutorial/Static-Free_FunctionMock_Example/include/FreeFunction.h
/usr/local/bin/FSeamerFile.py:426: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  return sb + ee if sm is not "" and em is not "" else content
/usr/local/bin/FSeamerFile.py:426: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  return sb + ee if sm is not "" and em is not "" else content
/usr/local/bin/CppHeaderParser.py:225: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if namespaceSeparator is 2:
...
# -- OCCURS: Several times.

Expected behavior Use the correct Python comparison operators. Use "==" instead of "is" and "!=" instead of "is not".

Desktop (please complete the following information):