Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def apply(self):
"""Apply the transformation by configuration."""
file_name = self.document.settings.file_name
self.url_resolver = self.config['url_resolver']
assert callable(self.url_resolver)
self.state_machine = DummyStateMachine()
self.current_level = 0
self.file_dir = abspath(dirname(file_name))
self.root_dir = self.file_dir
self.traverse(self.document)