Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuDartiailh committed Sep 17, 2024
1 parent 1c6bb98 commit aca46b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 6 additions & 4 deletions pyvisa_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
import logging
from importlib.metadata import PackageNotFoundError, version

# we need to import so that __init_subclass__() is executed once (hence the noqa)
from . import attributes # noqa: F401
from .highlevel import PyVisaLibrary

# Global pyvisa-py logger used to provide more details on errors (VISA error code
# can make some report rather terse).
LOGGER = logging.getLogger("pyvisa.pyvisa-py")

__version__ = "unknown"
Expand All @@ -19,8 +25,4 @@
# package is not installed
pass

# we need to import so that __init_subclass__() is executed once (hence the noqa)
from . import attributes # noqa: F401
from .highlevel import PyVisaLibrary

WRAPPER_CLASS = PyVisaLibrary
2 changes: 1 addition & 1 deletion pyvisa_py/highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def open(
try:
sess = cls(session, resource_name, parsed, open_timeout)
except sessions.OpenError as e:
return 0, e.error_code
return VISASession(0), e.error_code

return self._register(sess), StatusCode.success

Expand Down
3 changes: 1 addition & 2 deletions pyvisa_py/tcpip.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
from pyvisa import attributes, constants, errors, rname
from pyvisa.constants import BufferOperation, ResourceAttribute, StatusCode

from . import common, LOGGER
from . import LOGGER, common
from .protocols import hislip, rpc, vxi11
from .sessions import OpenError, Session, UnknownAttribute, VISARMSession


# Let psutil be optional dependency
try:
import psutil # type: ignore
Expand Down
1 change: 0 additions & 1 deletion pyvisa_py/testsuite/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from pyvisa.constants import InterfaceType
from pyvisa.testsuite import BaseTestCase
import pyvisa_py.highlevel
from pyvisa_py.sessions import Session


Expand Down

0 comments on commit aca46b3

Please sign in to comment.