This is a long due refactoring. At the time flynt was created, ast module didn't allow to find both start and end of the expression in the source code, therefore it was needed to have another, more complicated solution. Since python 3.8, ast allows to find exact start and end of the expression in the source code, and this was already used in string concatenations.
This PR moves functionality over to the new mechanism, leaving deletion of legacy code for future PRs.
This is a long due refactoring. At the time flynt was created,
ast
module didn't allow to find both start and end of the expression in the source code, therefore it was needed to have another, more complicated solution. Since python 3.8,ast
allows to find exact start and end of the expression in the source code, and this was already used in string concatenations.This PR moves functionality over to the new mechanism, leaving deletion of legacy code for future PRs.