Skip to content

Commit

Permalink
Merge pull request tylerlaberge#41 from mannenen/update-doc-behavioral
Browse files Browse the repository at this point in the history
update external usage links in docstrings to point to README instead of wiki
  • Loading branch information
tylerlaberge authored Oct 21, 2017
2 parents 10e5561 + 234be37 commit 14b48c7
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions pypattyrn/behavioral/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions pypattyrn/behavioral/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions pypattyrn/behavioral/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/behavioral/mediator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions pypattyrn/behavioral/memento.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/behavioral/null.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions pypattyrn/behavioral/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions pypattyrn/behavioral/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -19,7 +19,7 @@ def visit(self, node, *args, **kwargs):
"""
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
Expand All @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions pypattyrn/creational/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
"""

Expand Down Expand Up @@ -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}
"""

Expand Down
4 changes: 2 additions & 2 deletions pypattyrn/creational/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/creational/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/creational/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/creational/singleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/structural/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/structural/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 4 additions & 4 deletions pypattyrn/structural/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pypattyrn/structural/flyweight.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 14b48c7

Please sign in to comment.