1. Georg Brandl
  2. hgcodesmell

Commits

Georg Brandl  committed 7d6ef2a

Change terminology a bit.

  • Participants
  • Parent commits f3ac67e
  • Branches default

Comments (0)

Files changed (1)

File hgcodesmell.py

View file
 except ImportError:
     colorwrap = lambda o, s: o(s)
 
-# smelly things are tuples (regex, reason)
+# smelly patterns are tuples (regex, reason)
 print_stmt = (re.compile(r'^\+\s*print\b'), 'print statement')
 zero_div = (re.compile(r'^\+\s*1/0'), 'zero division error')
 set_trace = (re.compile(r'\bpdb\.set_trace\(\)'), 'set_trace')
 vim_cmd = (re.compile(r':(w|wq|q|x)$', re.M), 'vim exit command')
 windows_nl = (re.compile(r'\r'), 'Windows newline')
 
-# maps glob patterns to a list of smelly things
+# the master dict maps glob patterns to a list of smelly patterns
 SMELLY_STUFF = {
     '*.py': [print_stmt, zero_div, set_trace],
     '*': [vim_cmd],