[issue42123] Run the two times, only enable invalid_* rules on the second run

2020-10-22 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- keywords: +patch pull_requests: +21835 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22111 ___ Python tracker _

[issue42123] Run the two times, only enable invalid_* rules on the second run

2020-10-22 Thread Lysandros Nikolaou
New submission from Lysandros Nikolaou : We can avoid having to go through all the invalid rules (which might be a significant performance boost, since these may call expensive rules like primary or others), if we run the parser two times. On the first run, all the invalid rules are disabled