diff options
author | toonn <toonn@toonn.io> | 2021-08-27 19:35:15 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-08-27 19:35:15 +0200 |
commit | 96b7a07cb67e7264ad6e7b4ef3d3e7fdf70c70b5 (patch) | |
tree | e7d9adad845c5223a9a03542360c42bb0adaa4fb /doc | |
parent | d1bb32bfbeec41fccf7fabfd624000f117415639 (diff) | |
download | ranger-96b7a07cb67e7264ad6e7b4ef3d3e7fdf70c70b5.tar.gz |
doc/tools: Silence encoding lint
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/tools/convert_papermode_to_metadata.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/tools/convert_papermode_to_metadata.py b/doc/tools/convert_papermode_to_metadata.py index 57459097..58371193 100755 --- a/doc/tools/convert_papermode_to_metadata.py +++ b/doc/tools/convert_papermode_to_metadata.py @@ -36,9 +36,10 @@ def replace(source, target): print("Skipping file `%s'" % source) return - result = dict() + result = {} # Read the input file and convert it to a dictionary + # pylint: disable=unspecified-encoding with open(".paperinfo", "r") as infile: reader = csv.reader(infile, skipinitialspace=True) for lineno, row in enumerate(reader): @@ -59,6 +60,9 @@ def replace(source, target): # Write the obtained dictionary into the target file if result: + # There's no way to specify encoding in 2.x even though in this case we + # could choose to write in UTF-8. + # pylint: disable=unspecified-encoding with open(".metadata.json", "w") as outfile: json.dump(result, outfile, indent=2) else: |