Lines Matching refs:lineno
25 def _show_warning(message, category, filename, lineno, file=None, line=None): argument
33 file.write(formatwarning(message, category, filename, lineno, line))
40 def formatwarning(message, category, filename, lineno, line=None): argument
50 s = "%s: %s: %s\n" % (lineno, category.__name__, message)
51 line = linecache.getline(filename, lineno) if line is None else line
67 def filterwarnings(action, message="", category=Warning, module="", lineno=0, argument
87 assert isinstance(lineno, (int, long)) and lineno >= 0, \
90 re.compile(module), int(lineno))
96 def simplefilter(action, category=Warning, lineno=0, append=0): argument
108 assert isinstance(lineno, (int, long)) and lineno >= 0, \
110 item = (action, None, category, None, int(lineno))
140 action, message, category, module, lineno = [s.strip()
148 if lineno:
150 lineno = int(lineno)
151 if lineno < 0:
154 raise _OptionError("invalid lineno %r" % (lineno,))
156 lineno = 0
157 filterwarnings(action, message, category, module, lineno)
211 lineno = 1
214 lineno = caller.f_lineno
234 warn_explicit(message, category, filename, lineno, module, registry,
237 def warn_explicit(message, category, filename, lineno, argument
239 lineno = int(lineno)
252 key = (text, category, lineno)
262 (ln == 0 or lineno == ln)):
300 showwarning(message, category, filename, lineno)
310 def __init__(self, message, category, filename, lineno, file=None, argument
315 self.lineno = lineno
323 self.filename, self.lineno, self.line))