Fix simple_decorator and basictag not setting __module__.

Review Request #7736 — Created Oct. 25, 2015 and submitted

Information

Djblets
release-0.8.x

Reviewers

These decorators weren't setting __module__, which, while mostly
harmless, did result in Sphinx filtering out any functions decorated by
these two decorators.

We now use update_wrapper() from functools, which sets all the
attributes we need.

All Djblets and Review Board unit tests pass.

Description From Last Updated

For the sake of consistency, and assuming that there should be no blank lines between update_wrapper() and the return statement, …

PH phngo
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/util/decorators.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/util/decorators.py
    
    
  2. 
      
PH
  1. 
      
  2. djblets/util/decorators.py (Diff revision 1)
     
     
    Show all issues

    For the sake of consistency, and assuming that there should be no blank lines between update_wrapper() and the return statement, this blank line should be deleted.

    1. There ideally should be a blank line.

      I look at code as paragraphs of related concepts. A "return" is a conclusion. We don't have this 100% consistent across all the code in our codebase, but this is more correct than what we had.

  3. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.8.x (581ca96)
Loading...