Skip to content

Commit

Permalink
IndentationBear: Move generic methods to new file
Browse files Browse the repository at this point in the history
Move Generic methods and exceptions from IndentationBear
to RangeHelpers and CustomExceptions. Also it modifies
the bear to support indent based on keywords.
  • Loading branch information
aptrishu committed Mar 22, 2017
1 parent 34f1be4 commit ee7b664
Show file tree
Hide file tree
Showing 4 changed files with 442 additions and 234 deletions.
11 changes: 11 additions & 0 deletions bears/general/CustomExceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class UnmatchedIndentError(Exception):

def __init__(self, open_indent, close_indent):
Exception.__init__(self, 'Unmatched ' + open_indent + ', ' +
close_indent + ' pair')


class ExpectedIndentError(Exception):

def __init__(self, line):
Exception.__init__(self, 'Expected indent after line: ' + str(line))
Loading

0 comments on commit ee7b664

Please sign in to comment.