about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-08-27 19:35:15 +0200
committertoonn <toonn@toonn.io>2021-08-27 19:35:15 +0200
commit96b7a07cb67e7264ad6e7b4ef3d3e7fdf70c70b5 (patch)
treee7d9adad845c5223a9a03542360c42bb0adaa4fb
parentd1bb32bfbeec41fccf7fabfd624000f117415639 (diff)
downloadranger-96b7a07cb67e7264ad6e7b4ef3d3e7fdf70c70b5.tar.gz
doc/tools: Silence encoding lint
-rwxr-xr-xdoc/tools/convert_papermode_to_metadata.py6
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: