|
Revision 16275, 0.8 kB
(checked in by foom, 3 years ago)
|
Fix all uses of newly deprecated t.p.components functions.
Removes calls to backwardsCompatImplements, fixClassImplements, and
replaces default= kwarg in adapatation calls with positional arg.
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
from zope.interface import implements |
|---|
| 3 |
|
|---|
| 4 |
from twisted.lore.scripts.lore import IProcessor |
|---|
| 5 |
from twisted.plugin import IPlugin |
|---|
| 6 |
|
|---|
| 7 |
class _LorePlugin(object): |
|---|
| 8 |
implements(IPlugin, IProcessor) |
|---|
| 9 |
|
|---|
| 10 |
def __init__(self, name, moduleName, description): |
|---|
| 11 |
self.name = name |
|---|
| 12 |
self.moduleName = moduleName |
|---|
| 13 |
self.description = description |
|---|
| 14 |
|
|---|
| 15 |
DefaultProcessor = _LorePlugin( |
|---|
| 16 |
"lore", |
|---|
| 17 |
"twisted.lore.default", |
|---|
| 18 |
"Lore format") |
|---|
| 19 |
|
|---|
| 20 |
MathProcessor = _LorePlugin( |
|---|
| 21 |
"mlore", |
|---|
| 22 |
"twsited.lore.lmath", |
|---|
| 23 |
"Lore format with LaTeX formula") |
|---|
| 24 |
|
|---|
| 25 |
SlideProcessor = _LorePlugin( |
|---|
| 26 |
"lore-slides", |
|---|
| 27 |
"twisted.lore.slides", |
|---|
| 28 |
"Lore for slides") |
|---|
| 29 |
|
|---|
| 30 |
ManProcessor = _LorePlugin( |
|---|
| 31 |
"man", |
|---|
| 32 |
"twisted.lore.man2lore", |
|---|
| 33 |
"UNIX Man pages") |
|---|
| 34 |
|
|---|
| 35 |
NevowProcessor = _LorePlugin( |
|---|
| 36 |
"nevow", |
|---|
| 37 |
"twisted.lore.nevowlore", |
|---|
| 38 |
"Nevow for Lore") |
|---|