Merge pull request #41 from mannenen/update-doc-behavioral
update external usage links in docstrings to point to README instead of wiki
This commit is contained in:
@@ -5,7 +5,7 @@ class ChainLink(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract ChainLink object as part of the Chain of Responsibility pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#chain-of-responsibility-pattern}
|
||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
@@ -45,7 +45,7 @@ class Chain(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Chain class as part of the Chain of Responsibility pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#chain-of-responsibility-pattern}
|
||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
"""
|
||||
def __init__(self, chainlink):
|
||||
|
||||
@@ -5,7 +5,7 @@ class Receiver(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract receiver class as part of the Command pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#command-pattern}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
"""
|
||||
def action(self, name, *args, **kwargs):
|
||||
@@ -27,7 +27,7 @@ class Command(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Command class as part of the Command pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#command-pattern}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
"""
|
||||
def __init__(self, receiver):
|
||||
@@ -58,7 +58,7 @@ class Invoker(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Invoker class as part of the Command pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#command-pattern}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
"""
|
||||
def __init__(self, valid_commands):
|
||||
|
||||
@@ -5,7 +5,7 @@ class Iterator(object):
|
||||
"""
|
||||
An Iterator class for the Iterator design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#iterator-pattern}
|
||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
"""
|
||||
def __init__(self, iterable):
|
||||
@@ -28,7 +28,7 @@ class Iterable(object, metaclass=ABCMeta):
|
||||
"""
|
||||
An abstract class representing an Iterable object as part of the Iterator design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#iterator-pattern}
|
||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
"""
|
||||
@abstractmethod
|
||||
|
||||
@@ -5,7 +5,7 @@ class Mediator(object):
|
||||
"""
|
||||
Mediator class as part of the Mediator design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#mediator-pattern}
|
||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Mediator_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
|
||||
@@ -5,7 +5,7 @@ class Memento(object):
|
||||
"""
|
||||
Memento class as part of the Memento design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#memento-pattern}
|
||||
- External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
"""
|
||||
def __init__(self, state):
|
||||
@@ -26,7 +26,7 @@ class Originator(object):
|
||||
"""
|
||||
Originator base class as part of the Memento design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#memento-pattern}
|
||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
"""
|
||||
def commit(self):
|
||||
|
||||
@@ -2,7 +2,7 @@ class Null(object):
|
||||
"""
|
||||
A Null object class as part of the Null object design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#null-object-pattern}
|
||||
- External Null Object Pattern documentation: U{https://en.wikipedia.org/wiki/Null_Object_pattern}
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -5,7 +5,7 @@ class Observer(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Observer class as part of the Observer design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#observer-pattern}
|
||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
"""
|
||||
@abstractmethod
|
||||
@@ -20,7 +20,7 @@ class Observable(object):
|
||||
"""
|
||||
Base Observable class as part of the Observer design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#observer-pattern}
|
||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
|
||||
@@ -5,7 +5,7 @@ class Visitor(metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Visitor class as part of the Visitor Design Pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#visitor-pattern}
|
||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
"""
|
||||
def visit(self, node, *args, **kwargs):
|
||||
@@ -19,7 +19,7 @@ class Visitor(metaclass=ABCMeta):
|
||||
"""
|
||||
method = None
|
||||
for cls in node.__class__.__mro__:
|
||||
method_name = 'visit_'+cls.__name__.lower()
|
||||
method_name = 'visit_' + cls.__name__.lower()
|
||||
method = getattr(self, method_name, None)
|
||||
if method:
|
||||
break
|
||||
@@ -43,7 +43,7 @@ class Visitee(object):
|
||||
"""
|
||||
A base class for objects that wish to be able to be visited by a Visitor class.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#behavioral-patterns}
|
||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
"""
|
||||
def accept(self, visitor, *args, **kwargs):
|
||||
|
||||
@@ -5,7 +5,7 @@ class Director(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract director class, responsible for using a builder to fully construct an object.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#builder-pattern}
|
||||
- External Builder Pattern documentation: U{https://en.wikipedia.org/wiki/Builder_pattern}
|
||||
"""
|
||||
|
||||
@@ -39,7 +39,7 @@ class Builder(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract builder class, responsible for constructing various pieces of an object.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#builder-pattern}
|
||||
- External Builder Pattern documentation: U{https://en.wikipedia.org/wiki/Builder_pattern}
|
||||
"""
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ class Factory(object, metaclass=ABCMeta):
|
||||
|
||||
All Factories should inherit this class and overwrite the create method.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#factory-pattern}
|
||||
- External Factory Pattern documentation: U{https://en.wikipedia.org/wiki/Factory_method_pattern}
|
||||
"""
|
||||
@abstractmethod
|
||||
@@ -26,7 +26,7 @@ class AbstractFactory(Factory, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Factory Class as part of the AbstractFactory design pattern.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#abstract-factory-pattern}
|
||||
- External Abstract Factory Pattern documentation: U{https://en.wikipedia.org/wiki/Abstract_factory_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
|
||||
@@ -7,7 +7,7 @@ class Reusable(Originator, metaclass=ABCMeta):
|
||||
"""
|
||||
An abstract reusable class.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#object-pool-pattern}
|
||||
- External Object Pool Pattern documentation: U{https://en.wikipedia.org/wiki/Object_pool_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
|
||||
@@ -6,7 +6,7 @@ class Prototype(object):
|
||||
"""
|
||||
Prototype design pattern abstract class.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#prototype-pattern}
|
||||
- External Prototype Pattern documentation: U{https://en.wikipedia.org/wiki/Prototype_pattern}
|
||||
"""
|
||||
def prototype(self, **attributes):
|
||||
|
||||
@@ -4,7 +4,7 @@ class Singleton(type):
|
||||
|
||||
Enforces any object using this metaclass to only create a single instance.
|
||||
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#singleton-pattern}
|
||||
- External Singleton Pattern documentation: U{https://en.wikipedia.org/wiki/Singleton_pattern}
|
||||
"""
|
||||
__instance = None
|
||||
|
||||
@@ -2,7 +2,7 @@ class Adapter(object):
|
||||
"""
|
||||
Adapter class as part of the Adapter design pattern.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPattyrn#adapter-pattern}
|
||||
- External Adapter Pattern Documentation: U{https://en.wikipedia.org/wiki/Adapter_pattern}
|
||||
"""
|
||||
def __init__(self, adaptee, **adapted_methods):
|
||||
|
||||
@@ -2,7 +2,7 @@ class Composite(object):
|
||||
"""
|
||||
Composite class as part of the Composite pattern.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPattyrn#composite-pattern}
|
||||
- External Composite Pattern documentation: U{https://en.wikipedia.org/wiki/Composite_pattern}
|
||||
"""
|
||||
def __init__(self, interface):
|
||||
|
||||
@@ -6,7 +6,7 @@ class Decorator(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Base Decorator class that all decorator classes inherit from.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPattyrn#decorator-pattern}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
def __get__(self, instance, owner):
|
||||
@@ -27,7 +27,7 @@ class DecoratorSimple(Decorator, metaclass=ABCMeta):
|
||||
"""
|
||||
A Base Decorator class for decorators with no arguments.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPattyrn#decorator-pattern}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
def __init__(self, func):
|
||||
@@ -43,7 +43,7 @@ class DecoratorComplex(Decorator, metaclass=ABCMeta):
|
||||
"""
|
||||
A Base Decorator class for decorators with arguments.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPattyrn#decorator-pattern}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
@abstractmethod
|
||||
@@ -73,7 +73,7 @@ class CallWrapper(DecoratorSimple):
|
||||
"""
|
||||
A Decorator for wrapping DecoratorComplex __call__ methods.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPattyrn#decorator-pattern}
|
||||
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
def __call__(self, instance, func):
|
||||
|
||||
@@ -2,7 +2,7 @@ class FlyweightMeta(type):
|
||||
"""
|
||||
Flyweight meta class as part of the Flyweight design pattern.
|
||||
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
|
||||
- External Usage Documentation: U{https://github.com/tylerlaberge/PyPattyrn#flyweight-pattern}
|
||||
- External Flyweight Pattern documentation: U{https://en.wikipedia.org/wiki/Flyweight_pattern}
|
||||
"""
|
||||
def __new__(mcs, name, bases, attrs):
|
||||
|
||||
Reference in New Issue
Block a user