Skip to content

Commit

Permalink
WIP: changes requested in code review
Browse files Browse the repository at this point in the history
  • Loading branch information
waldyrious committed Jun 10, 2020
1 parent fa465a6 commit 0a44784
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
24 changes: 13 additions & 11 deletions codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,19 @@ def parse_options(args):

parser.add_argument('-q', '--quiet-level',
action='store', type=int, default=2,
help='Bitmask that allows suppressing some messages. '
'0: print all messages. 1: disable warnings about'
' wrong encoding. 2: disable warnings about '
'binary files (this is the default level). 4: '
'omit warnings about automatic fixes that were '
'disabled in the dictionary. 8: don\'t print '
'anything for non-automatic fixes. 16: don\'t '
'print the list of fixed files. As usual with '
'bitmasks, these levels can be combined; e.g. use'
' 3 to mean 1+2, 7 for 1+2+4, 23 for 1+2+4+16, '
'etc.')
help='Bitmask that allows suppressing messages. '
'0: print all messages. '
'1: disable warnings about wrong encoding. '
'2: disable warnings about binary files. '
'4: omit warnings about automatic fixes that were'
' disabled in the dictionary. '
'8: don\'t print anything for non-automatic '
'fixes. '
'16: don\'t print the list of fixed files. '
'As usual with bitmasks, these levels can be '
'combined; e.g. use 3 for levels 1+2, 7 for '
'1+2+4, 23 for 1+2+4+16, etc. '
'The default mask is 2.')

parser.add_argument('-e', '--hard-encoding-detection',
action='store_true', default=False,
Expand Down
1 change: 1 addition & 0 deletions codespell_lib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def test_encoding(tmpdir, capsys):
assert capsys.readouterr() == ('', '')
assert cs.main('-q', '0', f.name) == 0
assert 'WARNING: Binary file' in capsys.readouterr()[1]
assert capsys.readouterr() == ('', '')
finally:
os.remove(f.name)

Expand Down

0 comments on commit 0a44784

Please sign in to comment.