Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelDkhn committed Dec 6, 2023
1 parent 1e0e9f5 commit 089178e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions osiris/cairo/data_converter/data_converter.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# This module convert Data source to Cairo code.

import os

import numpy as np

from osiris.cairo.data_converter.data_statement_generator import (
get_data_refs,
get_data_statement,
get_data_statement_for_sequences,
)
from osiris.cairo.data_converter.tensor_creator import Sequence, Tensor, create_tensor
from osiris.cairo.data_converter.tensor_creator import Tensor, create_tensor
from osiris.cairo.file_manager.cairo_data import CairoData
from osiris.cairo.file_manager.file import ModFile
from osiris.dtypes.cairo_dtypes import Dtype


Expand Down
1 change: 1 addition & 0 deletions osiris/cairo/file_manager/cairo_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from osiris.cairo.file_manager.file import File


class CairoData(File):
def __init__(self, file: str):
super().__init__(file)
Expand Down
4 changes: 2 additions & 2 deletions osiris/cairo/file_manager/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def update(self, name: str):
If it doesn't, the new module statement is appended to the file.
"""
statement = f"mod {name};"
if any([line.startswith(statement) for line in self.buffer]):
if any(line.startswith(statement) for line in self.buffer):
# Use generator expression
return

with self.path.open("a") as f:
f.write(f"{statement}\n")


class File:
def __init__(self, path: str):
Expand Down
2 changes: 1 addition & 1 deletion osiris/dtypes/cairo_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ class Dtype(Enum):
I8 = "i8"
I32 = "i32"
U32 = "u32"
BOOL = 'bool'
BOOL = 'bool'

0 comments on commit 089178e

Please sign in to comment.