Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Nov 12, 2024
1 parent 70440be commit 9f90408
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/kvikio/kvikio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
del libkvikio


from kvikio._lib.defaults import CompatMode # noqa: F401
from kvikio._version import __git_commit__, __version__
from kvikio.cufile import CuFile
from kvikio.remote_file import RemoteFile, is_remote_file_available
from kvikio._lib.defaults import CompatMode

__all__ = [
"__git_commit__",
Expand Down
2 changes: 1 addition & 1 deletion python/kvikio/kvikio/_lib/defaults.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# distutils: language = c++
# cython: language_level=3

from libcpp cimport bool
from libc.stdint cimport uint8_t
from libcpp cimport bool


cdef extern from "<kvikio/defaults.hpp>" namespace "kvikio" nogil:
Expand Down
6 changes: 3 additions & 3 deletions python/kvikio/kvikio/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import kvikio._lib.defaults


def compat_mode() -> kvikio._lib.defaults.CompatMode:
def compat_mode() -> kvikio.CompatMode:
"""Check if KvikIO is running in compatibility mode.
Notice, this is not the same as the compatibility mode in cuFile. That is,
Expand All @@ -31,7 +31,7 @@ def compat_mode() -> kvikio._lib.defaults.CompatMode:
return kvikio._lib.defaults.compat_mode()


def compat_mode_reset(compatmode: kvikio._lib.defaults.CompatMode) -> None:
def compat_mode_reset(compatmode: kvikio.CompatMode) -> None:
"""Reset the compatibility mode.
Use this function to enable/disable compatibility mode explicitly.
Expand All @@ -47,7 +47,7 @@ def compat_mode_reset(compatmode: kvikio._lib.defaults.CompatMode) -> None:


@contextlib.contextmanager
def set_compat_mode(compatmode: kvikio._lib.defaults.CompatMode):
def set_compat_mode(compatmode: kvikio.CompatMode):
"""Context for resetting the compatibility mode.
Parameters
Expand Down
2 changes: 1 addition & 1 deletion python/kvikio/tests/test_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_compat_mode():
"""Test changing `compat_mode`"""

before = kvikio.defaults.compat_mode()
with kvikio.defaults.set_compat_mode():
with kvikio.defaults.set_compat_mode(kvikio.CompatMode.ON):
assert kvikio.defaults.compat_mode()
kvikio.defaults.compat_mode_reset(kvikio.CompatMode.OFF)
assert not kvikio.defaults.compat_mode()
Expand Down

0 comments on commit 9f90408

Please sign in to comment.