titipata / scipdf_parser

Python PDF parser for scientific publications: content and figures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SyntaxWarning: is not with a literal

raffaem opened this issue · comments

mypy throws these warnings.

Are you interested in a PR that fixes this?

[...]/.local/lib/python3.10/site-packages/scipdf/pdf/parse_pdf.py:114: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if middlename is not "":

Issue Resolved

Hi @raffaem ,

Thank you for bringing this! I'm happy to inform you that your concern has been addressed with the recent pull request #21. The syntax warnings you reported have been fixed in the parse_pdf.py file.

Specifically, the pull request addressed the following warnings:
parse_pdf.py:126: "is not" with a literal.
parse_pdf.py:213: "is not" with a literal.
parse_pdf.py:241: "is" with a literal.
parse_pdf.py:254: "is not" with a literal.
parse_pdf.py:303: "is not" with a literal.