Skip to content

Commit

Permalink
Appease extra fussy upgraded linter
Browse files Browse the repository at this point in the history
  • Loading branch information
awnawab committed May 27, 2024
1 parent 9ae7b50 commit 6707094
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion loki/backend/maxgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class <name> extends Kernel {

# Class signature
if is_manager:
if is_interface:
if is_interface: # pylint: disable=possibly-used-before-assignment
header += [self.format_line(
'public interface ', o.name, ' extends ManagerPCIe, ManagerKernel {')]
else:
Expand Down
1 change: 1 addition & 0 deletions loki/frontend/fparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ def visit_Char_Selector(self, o, **kwargs):
* some scalar expression for the kind
"""
length = None
kind = None
if o.children[0] is not None:
length = self.visit(o.children[0], **kwargs)
if o.children[1] is not None:
Expand Down
2 changes: 1 addition & 1 deletion loki/program_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def from_source(cls, source, definitions=None, preprocess=False,
if frontend == Frontend.OFP:
ast = parse_ofp_source(source)
return cls.from_ofp(ast=ast, raw_source=source, definitions=definitions,
pp_info=pp_info, parent=parent)
pp_info=pp_info, parent=parent) # pylint: disable=possibly-used-before-assignment

if frontend == Frontend.FP:
ast = parse_fparser_source(source)
Expand Down
2 changes: 1 addition & 1 deletion loki/transformations/pool_allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def _get_c_sizeof_arg(self, arr):
elif arr.type.dtype == BasicType.COMPLEX:
param = Cast(name='CMPLX', expression=(IntLiteral(1), IntLiteral(1)))

param.kind = getattr(arr.type, 'kind', None)
param.kind = getattr(arr.type, 'kind', None) # pylint: disable=possibly-used-before-assignment

return param

Expand Down
2 changes: 1 addition & 1 deletion loki/transformations/single_column/scc_cuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def transform_subroutine(self, routine, **kwargs):

remove_pragmas(routine)
single_variable_declaration(routine=routine, group_by_shape=True)
device_subroutine_prefix(routine, depth)
device_subroutine_prefix(routine, depth) # pylint: disable=possibly-used-before-assignment

routine.spec.prepend(ir.Import(module="cudafor"))

Expand Down

0 comments on commit 6707094

Please sign in to comment.