lint (W1514)
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
kleph 2022-04-05 13:27:24 +02:00
parent 5aacd6cff1
commit ba86d90e98
29 changed files with 30 additions and 30 deletions

2
1/1.py
View file

@ -4,7 +4,7 @@
count = 0
with open('input.txt') as f:
with open('input.txt', encoding="utf-8") as f:
previous_value = int(f.readline())
for line in f:

View file

@ -4,7 +4,7 @@
count = 0
with open('input.txt') as f:
with open('input.txt', encoding="utf-8") as f:
n2_value = int(f.readline())
n1_value = int(f.readline())
n_value = int(f.readline())

View file

@ -2,7 +2,7 @@
# 2021 - Advent Of Code - 10
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
i = 0
for line in f.readlines():
chunks = []

View file

@ -3,7 +3,7 @@
def parse_file(file):
non_corrupted = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
i = 0
for line in f.readlines():
chunks = []

View file

@ -5,7 +5,7 @@ GRID_SIZE = 10
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
columns = []
for line in f.readlines():
columns.append([int(c) for c in line.strip()])

View file

@ -5,7 +5,7 @@ GRID_SIZE = 10
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
columns = []
for line in f.readlines():
columns.append([int(c) for c in line.strip()])

View file

@ -3,7 +3,7 @@
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
return [x.strip() for x in f.readlines()]

View file

@ -3,7 +3,7 @@
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
return [x.strip() for x in f.readlines()]

View file

@ -5,7 +5,7 @@
def parse_file(file):
parsed_dots = []
parsed_folds = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for line in f.readlines():
if line.startswith('fold along '):
_, f = line.strip().split('fold along ')

View file

@ -5,7 +5,7 @@
def parse_file(file):
parsed_dots = []
parsed_folds = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for line in f.readlines():
if line.startswith('fold along '):
_, f = line.strip().split('fold along ')

View file

@ -5,7 +5,7 @@ from collections import Counter
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
poly_string = list(f.readline().strip())
f.readline()
insertion_rules = dict([line.strip().split(' -> ') for line in f.readlines()])

View file

@ -7,7 +7,7 @@ from collections import Counter
def parse_file(file):
poly_list = []
insertion_rules = {}
with open(file) as f:
with open(file, encoding="utf-8") as f:
poly_str = list(f.readline().strip())
for i, p in enumerate(poly_str):

View file

@ -5,7 +5,7 @@ from collections import Counter
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
poly_string = list(f.readline().strip())
f.readline()
insertion_rules = dict([line.strip().split(' -> ') for line in f.readlines()])

2
2/2.py
View file

@ -8,7 +8,7 @@ y = 0
re_parse = re.compile(r'(forward|up|down) (\d+)')
with open('input.txt') as f:
with open('input.txt', encoding="utf-8") as f:
for line in f:
m = re_parse.match(line)
direction, unit = m.group(1), int(m.group(2))

View file

@ -9,7 +9,7 @@ aim = 0
re_parse = re.compile(r'(forward|up|down) (\d+)')
with open('input.txt') as f:
with open('input.txt', encoding="utf-8") as f:
for line in f:
m = re_parse.match(line)
direction, unit = m.group(1), int(m.group(2))

2
3/3.py
View file

@ -9,7 +9,7 @@ result = [0] * 12
re_parse = re.compile(r'(\d)'*12)
with open('input.txt') as f:
with open('input.txt', encoding="utf-8") as f:
for line in f:
m = re_parse.match(line)
line_count += 1

View file

@ -58,7 +58,7 @@ def filter_freq(buffer, freq_buf, mode):
line_buf = []
with open('input.txt') as f:
with open('input.txt', encoding="utf-8") as f:
for input_line in f:
line_buf.append(input_line)

2
4/4.py
View file

@ -57,7 +57,7 @@ class Board:
def parse_file(file):
boards_list = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
numbers = f.readline().split(',')
line = f.readline()

View file

@ -57,7 +57,7 @@ class Board:
def parse_file(file):
boards_list = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
numbers = f.readline().split(',')
line = f.readline()

2
5/5.py
View file

@ -4,7 +4,7 @@
def parse_file(file):
horizontal_lines = []
vertical_lines = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for l in f.readlines():
p1, p2 = l.strip().split(' -> ')
strx1, stry1 = p1.split(',')

View file

@ -5,7 +5,7 @@ def parse_file(file):
horizontal_lines = []
vertical_lines = []
diagonal_lines = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for l in f.readlines():
p1, p2 = l.strip().split(' -> ')
strx1, stry1 = p1.split(',')

2
6/6.py
View file

@ -2,7 +2,7 @@
# 2021 - Advent Of Code - 6
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
line = f.readline()
return [int(x) for x in line.split(',')]

View file

@ -2,7 +2,7 @@
# 2021 - Advent Of Code - 6 part 2
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
line = f.readline()
list_state = [int(x) for x in line.split(',')]

2
7/7.py
View file

@ -2,7 +2,7 @@
# 2021 - Advent Of Code - 7
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
line = f.readline()
list_state = [int(x) for x in line.split(',')]

View file

@ -2,7 +2,7 @@
# 2021 - Advent Of Code - 7 part 2
def parse_file(file):
with open(file) as f:
with open(file, encoding="utf-8") as f:
line = f.readline()
list_state = [int(x) for x in line.split(',')]

2
8/8.py
View file

@ -3,7 +3,7 @@
def parse_file(file):
outs = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for line in f.readlines():
_, out = line.strip().split('| ')
outs.append(out)

View file

@ -6,7 +6,7 @@
def parse_file(file):
numbers_list = []
outputs = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for line in f.readlines():
numbers, output = line.strip().split(' | ')
numbers_list.append(numbers)

2
9/9.py
View file

@ -3,7 +3,7 @@
def parse_file(file):
hmap = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for line in f.readlines():
linemap = []
for n in line.strip():

View file

@ -3,7 +3,7 @@
def parse_file(file):
hmap = []
with open(file) as f:
with open(file, encoding="utf-8") as f:
for line in f.readlines():
linemap = []
for n in line.strip():