Explicitly specify encoding
The update to pylint means we were failing because open() doesn't specify the encoding everywhere. I have now specified utf-8 everywhere. This was patchy before, and is default behaviour on the Pi. There's a slim chance it will cause some issues on Windows, but that shouldn't affect anyone outside the developers. I've also ignored a couple of new spurious warnings, and explicitly ignored some unused variables.
This commit is contained in:
parent
9b7fba55b6
commit
a9fff24848
11 changed files with 16 additions and 15 deletions
|
|
@ -245,7 +245,7 @@ def extension_action(args=None):
|
|||
# Run the action
|
||||
return func(self.extension, **arguments)
|
||||
|
||||
def get(self, *args, **kwargs): # pylint: disable=useless-super-delegation
|
||||
def get(self, *args, **kwargs): # pylint: disable=useless-super-delegation,arguments-differ
|
||||
# Explicitly wrap the `get` method to allow us to add a docstring
|
||||
return super().get(*args, **kwargs)
|
||||
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ class CSMExtension(BaseExtension):
|
|||
"linear_calibration_y": cal_y,
|
||||
}
|
||||
|
||||
with open(CSM_DATAFILE_PATH, "w") as f:
|
||||
with open(CSM_DATAFILE_PATH, "w", encoding="utf-8") as f:
|
||||
json.dump(data, f, cls=JSONEncoder)
|
||||
|
||||
return data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue