dabeaz / ply

Python Lex-Yacc
http://www.dabeaz.com/ply/index.html
2.79k stars 465 forks source link

Minor cleanup (dead code and broken test import) #267

Closed wshanks closed 1 year ago

wshanks commented 2 years ago

Here are fixes for two issues I noticed (can split them apart if you want):

  1. lr_item appears to be an unused method (lr_item is not referenced anywhere else in the repo). The PR just removes it. The method accesses self.Prodnames which is never set which reinforces the point that the method is never used.
  2. Change the path for importing from cpp.py. I just noticed this because I wanted to be sure that all the tests passed after removing lr_item in 1.

I was updating dependencies for an old project and noticed that ply had not been updated in a while and that the suggestion was to vendor ply. After vendoring ply, pylint --errors-only on the project flagged the lr_item issue (that was all it flagged).