Lines Matching +full:check +full:- +full:whitespace
5 tabnanny -- Detection of ambiguous indentation
9 check() described below.
19 # XXX script-like. This will be addressed later.
27 __all__ = ["check", "NannyNag", "process_tokens"]
49 if o == '-q':
51 if o == '-v':
54 errprint("Usage:", sys.argv[0], "[-v] file_or_directory ...")
57 check(arg)
62 Captured and handled in check().
73 def check(file): function
74 """check(file_or_dir)
79 checked for whitespace related problems. The diagnostic messages are
91 os.path.normcase(name[-3:]) == ".py"):
92 check(fullname)
134 class Whitespace: class
142 # the number of leading whitespace characters in raw
159 S, T = Whitespace.S, Whitespace.T
170 count = count + [0] * (b - len(count) + 1)
184 return max(len(count)-1, trailing)
237 # M.num_tabs() <= N.num_tabs(). Proof is easy but kinda long-winded.
280 indents = [Whitespace("")]
294 thisguy = Whitespace(token)
295 if not indents[-1].less(thisguy):
296 witness = indents[-1].not_less_witness(thisguy)
302 # there's nothing we need to check here! what's important is
308 # is indented *and* lacks a newline -- then DEDENTs pop out
313 del indents[-1]
318 # ENDMARKER; the "line" argument exposes the leading whitespace
323 thisguy = Whitespace(line)
324 if not indents[-1].equal(thisguy):
325 witness = indents[-1].not_equal_witness(thisguy)