Lines Matching refs:lineno

24 def _show_warning(message, category, filename, lineno, file=None, line=None):
29 file.write(formatwarning(message, category, filename, lineno, line))
36 def formatwarning(message, category, filename, lineno, line=None):
38 s = "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message)
39 line = linecache.getline(filename, lineno) if line is None else line
45 def filterwarnings(action, message="", category=Warning, module="", lineno=0,
54 'lineno' -- an integer line number, 0 matches all warnings
65 assert isinstance(lineno, int) and lineno >= 0, \
66 "lineno must be an int >= 0"
68 re.compile(module), lineno)
74 def simplefilter(action, category=Warning, lineno=0, append=0):
81 'lineno' -- an integer line number, 0 matches all warnings
86 assert isinstance(lineno, int) and lineno >= 0, \
87 "lineno must be an int >= 0"
88 item = (action, None, category, None, lineno)
118 action, message, category, module, lineno = [s.strip()
126 if lineno:
128 lineno = int(lineno)
129 if lineno < 0:
132 raise _OptionError("invalid lineno %r" % (lineno,))
134 lineno = 0
135 filterwarnings(action, message, category, module, lineno)
189 lineno = 1
192 lineno = caller.f_lineno
212 warn_explicit(message, category, filename, lineno, module, registry,
215 def warn_explicit(message, category, filename, lineno,
217 lineno = int(lineno)
230 key = (text, category, lineno)
240 (ln == 0 or lineno == ln)):
278 showwarning(message, category, filename, lineno)
285 _WARNING_DETAILS = ("message", "category", "filename", "lineno", "file",
288 def __init__(self, message, category, filename, lineno, file=None,
296 return ("{message : %r, category : %r, filename : %r, lineno : %s, "
298 self.filename, self.lineno, self.line))