Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Jan 24, 2024
1 parent 32781aa commit 19af00a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions behave/features/steps/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
# pylint: disable=missing-function-docstring,function-redefined


def _first_int(string):
for line in string.split("\n")[:5]: # first 5 lines
def _first_int(string, max_lines=20):
for line in string.split("\n")[:max_lines]:
if not line:
continue
first_word = line.split()[0]
if first_word.isdigit():
return first_word
Expand Down

0 comments on commit 19af00a

Please sign in to comment.