~ubuntu-branches/ubuntu/vivid/pylint/vivid-proposed

« back to all changes in this revision

Viewing changes to checkers/format.py

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi
  • Date: 2009-12-19 21:38:49 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20091219213849-kcax3214c3mmucox
Tags: 0.19.0-1
* New upstream release
* debian/pylint.docs
  - removed 'TODO', no more shipped
* debian/copyright
  - updated copyright information, also adding new files with different info
* debian/{rules, TODO}
  - run tests at build-time
* debian/pylint.postrm
  - use 'set -e' instead of calling shell with '-e'

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    'C0301': ('Line too long (%s/%s)',
37
37
              'Used when a line is longer than a given number of characters.'),
38
38
    'C0302': ('Too many lines in module (%s)', # was W0302
39
 
              'Used when a module has too much lines, reducing its readibility.'
 
39
              'Used when a module has too much lines, reducing its readability.'
40
40
              ),
41
41
 
42
42
    'W0311': ('Bad indentation. Found %s %s, expected %s',
45
45
    'W0312': ('Found indentation with %ss instead of %ss',
46
46
              'Used when there are some mixed tabs and spaces in a module.'),
47
47
    'W0301': ('Unnecessary semicolon', # was W0106
48
 
              'Used when a statement is endend by a semi-colon (";"), which \
 
48
              'Used when a statement is ended by a semi-colon (";"), which \
49
49
              isn\'t necessary (that\'s python, not C ;).'),
50
50
 
51
51
    'F0321': ('Format detection error in %r',
52
 
              'Used when an unexpected error occured in bad format detection.'
 
52
              'Used when an unexpected error occurred in bad format detection.'
53
53
              'Please report the error if it occurs.'),
54
54
    'C0321': ('More than one statement on a single line',
55
55
              'Used when more than on statement are found on the same line.'),
123
123
    return result
124
124
 
125
125
def in_coords(match, string_coords):
126
 
    """return true if the match in in the string coord"""
 
126
    """return true if the match is in the string coord"""
127
127
    mstart = match.start()
128
128
    for start, end in string_coords:
129
129
        if mstart >= start and mstart < end: