Skip to content

Commit 2e940ec

Browse files
committed
lint fixes
1 parent 1b90081 commit 2e940ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/api/main.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def report() -> Response:
134134

135135
out_file = RISK_REPORT_DIR / f'{datetime.now().strftime("%Y-%m-%d")}_{gethostname()}.txt'
136136
with report_lock:
137-
with open(out_file, 'a+', encoding='utf-8') as f:
138-
f.write(json_dumps(r) + '\n')
137+
with open(out_file, 'a+', encoding='utf-8') as fo:
138+
fo.write(json_dumps(r) + '\n')
139139

140140
return _response_json(code=200, data={'msg': 'Reported'})
141141

@@ -182,6 +182,7 @@ def check_net(ip) -> Response:
182182
net = f"{net}/{NET_SIZE[ipv]}"
183183

184184
try:
185+
# pylint: disable=E0606
185186
return _response_json(code=200, data={**NET_DATA[ipv][net], 'network': net})
186187

187188
except KeyError:
@@ -194,6 +195,7 @@ def check_asn(nr) -> Response:
194195
return _response_json(code=400, data={'msg': 'Invalid ASN provided'})
195196

196197
try:
198+
# pylint: disable=E0606
197199
return _response_json(code=200, data=ASN_DATA[str(nr)])
198200

199201
except KeyError:

0 commit comments

Comments
 (0)