Skip to content

Commit f33dde3

Browse files
committed
Fix linting errors
1 parent 8a34e6a commit f33dde3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

relint.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import yaml
1010

11-
1211
GIT_DIFF_LINE_NUMBERS_PATTERN = re.compile(
1312
r"@ -\d+(,\d+)? \+(\d+)(,)?(\d+)? @")
1413
GIT_DIFF_FILENAME_PATTERN = re.compile(
@@ -48,7 +47,7 @@ def parse_args():
4847

4948
def load_config(path):
5049
with open(path) as fs:
51-
for test in yaml.load(fs):
50+
for test in yaml.safe_load(fs):
5251
filename = test.get('filename', ['*'])
5352
if not isinstance(filename, list):
5453
filename = list(filename)
@@ -95,6 +94,7 @@ def parse_line_numbers(output):
9594
9695
Returns:
9796
list: All changed line numbers.
97+
9898
"""
9999
line_numbers = []
100100
matches = GIT_DIFF_LINE_NUMBERS_PATTERN.finditer(output)
@@ -123,6 +123,7 @@ def split_diff_content_by_filename(output):
123123
124124
Returns:
125125
dict: Filename and its content.
126+
126127
"""
127128
content_by_filename = {}
128129
filenames = parse_filenames(output)

test_relint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import pytest
44

5-
from relint import parse_diff, main, match_with_diff_changes, \
6-
parse_line_numbers, parse_filenames, split_diff_content_by_filename
5+
from relint import (main, match_with_diff_changes, parse_diff, parse_filenames,
6+
parse_line_numbers, split_diff_content_by_filename,)
77

88

99
class TestMain:

0 commit comments

Comments
 (0)