Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brian14708 committed Mar 5, 2024
1 parent 35935ff commit 782c22e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tsar-py/tsar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from tsar.writer import writer
from tsar.extract import extract
from .writer import writer
from .extract import extract
5 changes: 4 additions & 1 deletion tsar-py/tsar/tsar.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# pylint: disable=unused-argument, missing-class-docstring, too-many-arguments

from typing import Optional, Tuple

class Writer:
def __init__(self, dst: str): ...
def write_blob(
self,
type: str,
typ: str,
name: str,
data: bytes,
shape: list[int],
Expand All @@ -16,6 +18,7 @@ class Writer:
name: str,
data: bytes,
) -> None: ...
def close(self) -> None: ...

class Reader:
def __init__(self, src: str): ...
Expand Down
4 changes: 2 additions & 2 deletions tsar-py/tsar/writer.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from contextlib import contextmanager

import tsar.tsar as _tsar
from .tsar import Writer


@contextmanager
def writer(*args, **kwds):
# Code to acquire resource, e.g.:
wobj = _tsar.Writer(*args, **kwds)
wobj = Writer(*args, **kwds)
try:
yield wobj
finally:
Expand Down

0 comments on commit 782c22e

Please sign in to comment.