Skip to content

Commit

Permalink
Fix for Python 3.7 (#577)
Browse files Browse the repository at this point in the history
* Fix for Python 3.7

* flake8

* flake8
  • Loading branch information
guilhermeleobas authored Aug 1, 2023
1 parent f72513f commit 8fdca78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions rbc/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ def match_signature(self, atypes):

satypes = ", ".join(map(str, atypes))
raise TypeError(
f"{compile_target=}: found no matching function type to the given argument types"
f" `{satypes}` and device `{device}` while processing `{self.name}`."
f" Available function type is `{this_type}`."
f"compile_target={compile_target}: found no matching function type "
f"to the given argument types `{satypes}` and device `{device}` "
f"while processing `{self.name}`. Available function type is "
f"`{this_type}`."
)

def get_codegen(self):
Expand Down
2 changes: 1 addition & 1 deletion rbc/targetinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def add_library(self, lib):
def set_compile_target(self, target_name):
"""Set target function name being compiled.
"""
assert target_name is None or self._compile_target is None,\
assert target_name is None or self._compile_target is None, \
(target_name, self._compile_target)
self._compile_target = target_name

Expand Down
4 changes: 2 additions & 2 deletions rbc/tests/heavydb/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def array_getitem_double(x, i):
desrc, result = heavydb.sql_execute(query)
for a, item in result:
assert a[2] == item
assert type(a[2]) == type(item)
assert type(a[2]) is type(item)

@heavydb('float(float[], int64)')
def array_getitem_float(x, i):
Expand All @@ -217,7 +217,7 @@ def array_getitem_float(x, i):
desrc, result = heavydb.sql_execute(query)
for a, item in result:
assert a[2] == item
assert type(a[2]) == type(item)
assert type(a[2]) is type(item)


def test_sum(heavydb):
Expand Down

0 comments on commit 8fdca78

Please sign in to comment.