Skip to content

Commit 01f9ed1

Browse files
committed
lint: fix issues that the Python linter mistakenly flags as new
1 parent 7dfc65f commit 01f9ed1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dist-git-client/dist_git_client.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def parse_sources(args, config):
223223
Locate the sources, and download them from the appropriate dist-git
224224
lookaside cache.
225225
"""
226+
# pylint: disable=too-many-locals
226227
parsed_url, distgit_config = get_distgit_config(config, args.forked_from)
227228
namespace = parsed_url.path.strip('/').split('/')
228229
# drop the last {name}.git part
@@ -245,7 +246,7 @@ def parse_sources(args, config):
245246
return
246247

247248
logging.info("Reading sources specification file: %s", sources_file)
248-
with open(sources_file, 'r') as sfd:
249+
with open(sources_file, 'r', encoding="utf8") as sfd:
249250
while True:
250251
line = sfd.readline()
251252
if not line:
@@ -274,7 +275,7 @@ def parse_sources(args, config):
274275
filename = os.path.basename(source_spec[1])
275276
kwargs["filename"] = filename.strip('()')
276277
else:
277-
msg = "Weird sources line: {0}".format(line)
278+
msg = f"Weird sources line: {line}"
278279
raise RuntimeError(msg)
279280

280281
url_file = '/'.join([

0 commit comments

Comments
 (0)