Skip to content

Commit af21ace

Browse files
committed
Fix linting errors.
1 parent ef2eb70 commit af21ace

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

test/hermes_test/model/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
# SPDX-FileContributor: Sophie Kernchen
5+
# SPDX-FileContributor: Sophie Kernchen

test/hermes_test/model/types/test_ld_container.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ def test_to_python_type(self, mock_context):
101101

102102
def test_to_python_id_value(self, mock_context):
103103
cont = ld_container([{}], context=[mock_context])
104-
assert cont._to_python("http://spam.eggs/ham", [{"@id": "http://spam.eggs/spam"}]) == "http://spam.eggs/spam"
105-
assert cont._to_python("http://spam.eggs/ham", [{"@id": "http://spam.eggs/identifier"}]) == "http://spam.eggs/identifier"
104+
assert cont._to_python("http://spam.eggs/ham",
105+
[{"@id": "http://spam.eggs/spam"}]) == "http://spam.eggs/spam"
106+
assert cont._to_python("http://spam.eggs/ham",
107+
[{"@id": "http://spam.eggs/identifier"}]) == "http://spam.eggs/identifier"
106108

107109
def test_to_python_basic_value(self, mock_context):
108110
cont = ld_container([{}], context=[mock_context])
109111
assert cont._to_python("http://soam.eggs/spam", [{"@value": "bacon"}]) == 'bacon'
110-
assert cont._to_python("http://spam.eggs/spam", [{"@value": True}]) == True
112+
assert cont._to_python("http://spam.eggs/spam", [{"@value": True}]) is True
111113
assert cont._to_python("http://spam.eggs/spam", [{"@value": 123}]) == 123
112114

113115
def test_to_python_datetime_value(self, mock_context):
@@ -148,6 +150,6 @@ def test_to_expanded_basic_value(self, mock_context):
148150

149151
def test_to_expanded_datetime_value(self, mock_context):
150152
cont = ld_container([{}], context=[mock_context])
151-
assert cont._to_expanded_json("eggs", datetime(2022, 2,22)) == [
153+
assert cont._to_expanded_json("eggs", datetime(2022, 2, 22)) == [
152154
{"@value": "2022-02-22T00:00:00", "@type": "http://schema.org/DateTime"}
153155
]

test/hermes_test/model/types/test_pyld_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ def test_mock_document_compact(ld_proc, mock_document):
1313
assert compact_document == mock_document.compact()
1414

1515

16-
def test_mock_document_compact(ld_proc, mock_document):
16+
def test_mock_document_expanded(ld_proc, mock_document):
1717
expanded_document = ld_proc.expand(mock_document.compact(), {})
1818
assert expanded_document == mock_document.expanded()

0 commit comments

Comments
 (0)