Fix long line splitting issue in python_print (#36188)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36188
* Need to remove n^2 behavior for scanning whether to split or not
otherwise long inline chains will take a long time re-scanning.
Test Plan: Imported from OSS
Differential Revision: D20907254
Pulled By: zdevito
fbshipit-source-id: ebfc1a4eefc26d5806381e7afd75b7a9cd4cde97