GeezerVison is showing github.com — use config.every rather than config.last for configHandlers · fuzz-security/java2python@150e5ce
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: java2python/compiler/template.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -173,7 +173,7 @@ def configHandler(self, part, suffix='Handler', default=None): | 173 | 173 | def configHandlers(self, part, suffix='Handlers'): | 174 | 174 | """ Returns config handlers for this type of template """ | 175 | 175 | name = '{0}{1}{2}'.format(self.typeName, part, suffix) | 176 | | - return imap(self.toIter, self.config.last(name, ())) | | 176 | + return imap(self.toIter, chain(*self.config.every(name, []))) | 177 | 177 |
| 178 | 178 | def dump(self, fd, level=0): | 179 | 179 | """ Writes the Python source code for this template to the given file. """ | |
Collapse file Copy file name to clipboard +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -from java2python.config.default import modulePrologueHandlers | 2 | | - | 3 | | -modulePrologueHandlers += [ | | 1 | +modulePrologueHandlers = [ | 4 | 2 | 'from java2python.mod.include.overloading import overloaded', | 5 | 3 | 'from abc import ABCMeta, abstractmethod', | 6 | 4 | ] |
Collapse file Copy file name to clipboard +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -from java2python.config.default import modulePrologueHandlers | 2 | | - | 3 | | -modulePrologueHandlers += [ | | 1 | +modulePrologueHandlers = [ | 4 | 2 | "from abc import ABCMeta, abstractmethod", | 5 | 3 | ] |
Collapse file Copy file name to clipboardExpand all lines: test/configs/defaults.py +1-4Lines changed: 1 addition & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | #!/usr/bin/env python | 2 | 2 | # -*- coding: utf-8 -*- | 3 | | -from java2python.config import default | 4 | | - | 5 | | - | 6 | | -modulePrologueHandlers = default.modulePrologueHandlers + [ | | 3 | +modulePrologueHandlers = [ | 7 | 4 | 'from java2python.mod.include.classmethod import classmethod_ as classmethod', | 8 | 5 | 'from java2python.mod.include.overloading import overloaded', | 9 | 6 | 'from abc import ABCMeta, abstractmethod', | |
|