Skip to content

Commit 52e223b

Browse files
committed
Fix linting errors
1 parent 5d4a85c commit 52e223b

4 files changed

Lines changed: 4 additions & 9 deletions

File tree

terminusdb_client/client/Client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ def get_document_history(
643643
'start': start,
644644
'count': count,
645645
}
646-
647646
if created:
648647
params['created'] = created
649648
if updated:

terminusdb_client/schema/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _check_mismatch_type(prop, prop_value, prop_type):
9898
f"Property {prop} should be of type {prop_type_id} but got value of type {prop_value_id}"
9999
)
100100
else:
101-
if prop_type == int:
101+
if prop_type is int:
102102
prop_value = int(prop_value)
103103
# TODO: This is now broken
104104
# check_type(prop, prop_value, prop_type)
@@ -224,7 +224,7 @@ class DocumentTemplate(metaclass=TerminusClass):
224224
def __setattr__(self, name, value):
225225
if name[0] != "_" and value is not None:
226226
correct_type = self._annotations.get(name)
227-
if correct_type == int:
227+
if correct_type is int:
228228
try:
229229
value = int(value)
230230
except ValueError:

terminusdb_client/scripts/scripts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def add_docstring(self, obj_dict):
242242
result_obj.script += f" {value} = ()\n"
243243
else:
244244
result_obj.script += (
245-
f" {value.replace(' ','_')} = '{value}'\n"
245+
f" {value.replace(' ', '_')} = '{value}'\n"
246246
)
247247
if obj.get("@documentation"):
248248
result_obj.add_docstring(obj)
@@ -469,7 +469,7 @@ def _df_to_schema(class_name, df):
469469
converted_type = class_name
470470
else:
471471
converted_type = np_to_buildin[dtype.type]
472-
if converted_type == object:
472+
if converted_type is object:
473473
converted_type = str # pandas treats all string as objects
474474
converted_type = wt.to_woql_type(converted_type)
475475

terminusdb_client/woql_type.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
nonNegativeInteger = NewType('nonNegativeInteger', int) # noqa: N816
2626
base64Binary = NewType('base64Binary', str) # noqa: N816
2727
hexBinary = NewType('hexBinary', str) # noqa: N816
28-
anyURI = NewType('anyURI', str) # noqa: N816
2928
language = NewType('language', str)
3029
normalizedString = NewType('normalizedString', str) # noqa: N816
3130
token = NewType('token', str)
@@ -38,9 +37,7 @@
3837
bool: "xsd:boolean",
3938
float: "xsd:double",
4039
int: "xsd:integer",
41-
long: "xsd:long",
4240
dict: "sys:JSON",
43-
gYear: "xsd:gYear",
4441
dt.datetime: "xsd:dateTime",
4542
dt.date: "xsd:date",
4643
dt.time: "xsd:time",
@@ -68,7 +65,6 @@
6865
nonNegativeInteger : "xsd:nonNegativeInteger",
6966
base64Binary : "xsd:base64Binary",
7067
hexBinary : "xsd:hexBinary",
71-
anyURI : "xsd:anyURI",
7268
language : "xsd:language",
7369
normalizedString : "xsd:normalizedString",
7470
token : "xsd:token",

0 commit comments

Comments
 (0)