Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax warning over comparison of literals using is. #1623

Merged
merged 1 commit into from
Jan 29, 2021
Merged

Fix syntax warning over comparison of literals using is. #1623

merged 1 commit into from
Jan 29, 2021

Conversation

tirkarthi
Copy link
Contributor

Fixes syntax warnings in Python 3.9

find . -iname '*.py' | xargs -P4 -I{} python3.9 -Wall -m py_compile {}  
./PPOCRLabel/PPOCRLabel.py:1035: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if trans_dic["label"] is "" and mode == 'Auto':
./PPOCRLabel/PPOCRLabel.py:1794: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if result[0][0] is not '':
./PPOCRLabel/PPOCRLabel.py:1825: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if result[0][0] is not '':
./PPOCRLabel/PPOCRLabel.py:2011: SyntaxWarning: "is" with a literal. Did you mean "=="?
  assert output is 0, "operate the cmd have some problems ,please check  whether there is a in the lib " \

@CLAassistant
Copy link

CLAassistant commented Dec 31, 2020

CLA assistant check
All committers have signed the CLA.

@MissPenguin MissPenguin merged commit fad4015 into PaddlePaddle:dygraph Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants