Add a RegistryHook base class

Review Request #8530 - Created Nov. 8, 2016 and submitted

Barret Rennie
Djblets
release-0.10.x
8531
djblets

The RegistryHook is a base class that handles registration and
unregistration of items from registries. Subclasses can set the
specific registry to use.

Tests have been added to ensure that the hook correctly registers
items.

  • Ran unit tests.
  • Used this in /r/8531.
  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Review Bot
  1. Tool: Pyflakes
    Processed Files:
        djblets/extensions/hooks.py
        djblets/extensions/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/extensions/hooks.py
        djblets/extensions/tests.py
    
    
  2. 
      
David Trowbridge
  1. 
      
  2. djblets/extensions/tests.py (Diff revision 1)
     
     

    Can you add a docstring for this?

  3. 
      
Barret Rennie
Review Bot
  1. Tool: Pyflakes
    Processed Files:
        djblets/extensions/hooks.py
        djblets/extensions/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/extensions/hooks.py
        djblets/extensions/tests.py
    
    
  2. 
      
Christian Hammond
  1. 
      
  2. djblets/extensions/hooks.py (Diff revision 2)
     
     

    Can we call this BaseRegistryHook, since it's not meant to be used directly?

  3. djblets/extensions/hooks.py (Diff revision 2)
     
     

    :py:attr:

  4. djblets/extensions/tests.py (Diff revision 2)
     
     

    We should test unregistration too.

  5. 
      
Barret Rennie
Review Bot
  1. Tool: Pyflakes
    Processed Files:
        djblets/extensions/hooks.py
        djblets/extensions/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/extensions/hooks.py
        djblets/extensions/tests.py
    
    
  2. 
      
David Trowbridge
  1. Ship It!
  2. 
      
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (75e5630)
Loading...