python - How to fetch method call using a custom migration fixer in lib2to3? -
i trying create custom migration fixer lib2to3. idea of fixer fetch specific constructions, such as:
a.b() we have tried using script called find_pattern.py, no luck far. output following:
power< 'a' trailer< '.' 'b' > trailer< '(' ')' > > but unfortunately, might have guessed - doesn't work. pattern basefix should use?
this pattern needs prepared.
pattern = ''' power< head=any+ trailer< '.' method=any > parens=trailer< '(' tail=[argument | arglist] ')'> > '''
Comments
Post a Comment