Skip to content
Advertisement

Tag: lib2to3

Python EBNF Syntax to Match a Decorator

I have a very large project where I need to move some modules from bar to foo.bar, and subsequently update all functions calls to reflect new location. This works fine against function calls, but I am having problems building a pattern to match decorators. The code I like to match is:: I would like to turn the patch above to

Advertisement