Revision b459a848 lib/compat.py

b/lib/compat.py
27 27
import operator
28 28

  
29 29
try:
30
  # pylint: disable-msg=F0401
30
  # pylint: disable=F0401
31 31
  import functools
32 32
except ImportError:
33 33
  functools = None
34 34

  
35 35
try:
36
  # pylint: disable-msg=F0401
36
  # pylint: disable=F0401
37 37
  import roman
38 38
except ImportError:
39 39
  roman = None
......
45 45
# modules (hmac, for example) which have changed their behavior as well from
46 46
# one version to the other.
47 47
try:
48
  # pylint: disable-msg=F0401
48
  # pylint: disable=F0401
49 49
  # Yes, we're not using the imports in this module.
50
  # pylint: disable-msg=W0611
50
  # pylint: disable=W0611
51 51
  from hashlib import md5 as md5_hash
52 52
  from hashlib import sha1 as sha1_hash
53 53
  # this additional version is needed for compatibility with the hmac module
......
78 78

  
79 79

  
80 80
try:
81
  # pylint: disable-msg=E0601
82
  # pylint: disable-msg=W0622
81
  # pylint: disable=E0601
82
  # pylint: disable=W0622
83 83
  all = all
84 84
except NameError:
85 85
  all = _all
86 86

  
87 87
try:
88
  # pylint: disable-msg=E0601
89
  # pylint: disable-msg=W0622
88
  # pylint: disable=E0601
89
  # pylint: disable=W0622
90 90
  any = any
91 91
except NameError:
92 92
  any = _any
93 93

  
94 94

  
95
def partition(seq, pred=bool): # pylint: disable-msg=W0622
95
def partition(seq, pred=bool): # pylint: disable=W0622
96 96
  """Partition a list in two, based on the given predicate.
97 97

  
98 98
  """
......
102 102

  
103 103
# Even though we're using Python's built-in "partial" function if available,
104 104
# this one is always defined for testing.
105
def _partial(func, *args, **keywords): # pylint: disable-msg=W0622
105
def _partial(func, *args, **keywords): # pylint: disable=W0622
106 106
  """Decorator with partial application of arguments and keywords.
107 107

  
108 108
  This function was copied from Python's documentation.
......
111 111
  def newfunc(*fargs, **fkeywords):
112 112
    newkeywords = keywords.copy()
113 113
    newkeywords.update(fkeywords)
114
    return func(*(args + fargs), **newkeywords) # pylint: disable-msg=W0142
114
    return func(*(args + fargs), **newkeywords) # pylint: disable=W0142
115 115

  
116 116
  newfunc.func = func
117 117
  newfunc.args = args

Also available in: Unified diff