Преглед изворни кода

PEP8 changes

A few small adjustments.
Jeroen пре 11 година
родитељ
комит
2efc2204a0
2 измењених фајлова са 7 додато и 3 уклоњено
  1. 6 3
      decorator.py
  2. 1 0
      prototype.py

+ 6 - 3
decorator.py

@@ -1,24 +1,27 @@
-'''https://docs.python.org/2/library/functools.html#functools.wraps'''
-'''https://stackoverflow.com/questions/739654/how-can-i-make-a-chain-of-function-decorators-in-python/739665#739665'''
+"""https://docs.python.org/2/library/functools.html#functools.wraps"""
+"""https://stackoverflow.com/questions/739654/how-can-i-make-a-chain-of-function-decorators-in-python/739665#739665"""
 
 from functools import wraps
 
+
 def makebold(fn):
     @wraps(fn)
     def wrapped():
         return "<b>" + fn() + "</b>"
     return wrapped
 
+
 def makeitalic(fn):
     @wraps(fn)
     def wrapped():
         return "<i>" + fn() + "</i>"
     return wrapped
 
+
 @makebold
 @makeitalic
 def hello():
-    '''a decorated hello world'''
+    """a decorated hello world"""
     return "hello world"
 
 if __name__ == '__main__':

+ 1 - 0
prototype.py

@@ -23,6 +23,7 @@ class Prototype:
         obj.__dict__.update(attr)
         return obj
 
+
 class A:
     def __init__(self):
         self.x = 3