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
|
|
@ -28,7 +28,7 @@ def test_thing_description_valid():
|
|||
# TODO: it would be nice to put this into LabThings
|
||||
# First load the schema from file and check it validates
|
||||
schema_fname = os.path.join(os.path.dirname(__file__), "w3c_td_schema.json")
|
||||
schema = json.load(open(schema_fname, "r"))
|
||||
schema = json.load(open(schema_fname, "r"), encoding="utf-8")
|
||||
jsonschema.Draft7Validator.check_schema(schema)
|
||||
|
||||
# Build a TD dictionary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue