Skip to content

Commit 597ecef

Browse files
fix(src/*): Fix code to Python3
1 parent 14caaf8 commit 597ecef

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/create_mock_endpoints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
def slugify(value):
7-
value = value.decode('utf-8')
87
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
98
value = re.sub(r'[^\w\s-]', '', value).strip().lower()
109
return re.sub(r'[-\s]+', '_', value)

src/serialize_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@ def get_single_endpoint_detail(lines):
5050

5151
def parse_and_get_json_from_subsequent_lines(lines_iterator):
5252
try:
53-
next_line = lines_iterator.next()
53+
next_line = next(lines_iterator)
5454
except StopIteration:
5555
return ''
5656
while next_line != '```json':
5757
try:
58-
next_line = lines_iterator.next()
58+
next_line = next(lines_iterator)
5959
except StopIteration:
6060
return ''
6161
# Skip the row having starting json tag
62-
next_line = lines_iterator.next()
62+
next_line = next(lines_iterator)
6363
array_of_json_statements = list()
6464
while next_line != '```':
6565
array_of_json_statements.append(next_line)
6666
try:
67-
next_line = lines_iterator.next()
67+
next_line = next(lines_iterator)
6868
except StopIteration:
6969
pass
7070

0 commit comments

Comments
 (0)