Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
isidore committed Nov 26, 2023
2 parents e788ea2 + abbd3ac commit 9c1d052
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion approvaltests/inline/split_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ def on_method(code, method_name) -> "SplitCode":
before = []
after = []
tab = " "

class State(Enum):
BEFORE = 0
FIRST_LINE_OF_METHOD_BODY = 1
IN_DOCSTRING = 2
AFTER_DOCTSTRING = 3

state = State.BEFORE

for line in lines:
Expand All @@ -32,7 +34,7 @@ class State(Enum):
elif state == State.BEFORE:
before.append(line)
elif state == State.FIRST_LINE_OF_METHOD_BODY:
tab = re.compile(r'^\s*').match(line).group()
tab = re.compile(r"^\s*").match(line).group()
if stripped_line.startswith('"""'):
state = State.IN_DOCSTRING
else:
Expand Down

0 comments on commit 9c1d052

Please sign in to comment.