~ubuntu-branches/ubuntu/trusty/pylint/trusty

« back to all changes in this revision

Viewing changes to test/input/func_noerror_staticmethod_as_decorator.py

  • Committer: Bazaar Package Importer
  • Author(s): Sylvain Thénault
  • Date: 2006-09-25 16:46:40 UTC
  • mfrom: (1.2.1 upstream) (2.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20060925164640-obkb6g34gqtyk20n
new uptream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# pylint: disable-msg=R0903
 
2
"""test staticmethod and classmethod as decorator"""
 
3
 
 
4
__revision__ = None
 
5
 
 
6
class StaticMethod1(object):
 
7
    """staticmethod test"""
 
8
    def __init__(self):
 
9
        pass
 
10
 
 
11
    @staticmethod
 
12
    def do_work():
 
13
        "Working..."
 
14
        
 
15
    @staticmethod
 
16
    def do_work_with_arg(job):
 
17
        "Working on something"
 
18
        print "Working on %s..." % job
 
19
 
 
20
 
 
21
class ClassMethod2(object):
 
22
    """classmethod test"""
 
23
    def __init__(self):
 
24
        pass
 
25
 
 
26
    @classmethod
 
27
    def do_work(cls):
 
28
        "Working..."
 
29
        
 
30
    @classmethod
 
31
    def do_work_with_arg(cls, job):
 
32
        "Working on something"
 
33
        print "Working on %s..." % job
 
34
 
 
35