Repository: rambo/python-scpi (language: python)

Issue:
TypeError: _command() takes 0 positional arguments but 1 was given
https://github.com/rambo/python-scpi/blob/5d4c580e3309b56e3fde53fb44abf0f8e0a04f2c/src/scpi/scpi.py#L177

Should this not be:

`async def _command(command) -> None:`
TypeError: _command() takes 0 positional arguments but 1 was given
https://github.com/rambo/python-scpi/blob/5d4c580e3309b56e3fde53fb44abf0f8e0a04f2c/src/scpi/scpi.py#L177

Should this not be:

`async def _command(command) -> None:`


Discussion / hints:
yes, I'll fix this during the weekend.
yes, I'll fix this during the weekend.

Fix patch:
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 456abab..ca74c9c 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 2.3.0
+current_version = 2.3.1
 commit = False
 tag = False
 
diff --git a/pyproject.toml b/pyproject.toml
index 9eec7ac..b4cb2bc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "scpi"
-version = "2.3.0"
+version = "2.3.1"
 description = "Basic idea here is to make transport-independent command sender/parser and a device baseclass that implements the common SCPI commands"
 authors = ["Eero af Heurlin <eero.afheurlin@iki.fi>"]
 homepage = "https://github.com/rambo/python-scpi/"
diff --git a/src/scpi/__init__.py b/src/scpi/__init__.py
index 9470860..cc92638 100644
--- a/src/scpi/__init__.py
+++ b/src/scpi/__init__.py
@@ -1,5 +1,5 @@
 """SCPI module, the scpi class implements the base command set, devices may extend it.
 transports are separate from devices (so you can use for example hp6632b with either serial port or GPIB)"""
-__version__ = "2.3.0"  # NOTE Use `bump2version --config-file patch` to bump versions correctly
+__version__ = "2.3.1"  # NOTE Use `bump2version --config-file patch` to bump versions correctly
 from .scpi import SCPIProtocol, SCPIDevice
 from .errors import CommandError
diff --git a/src/scpi/scpi.py b/src/scpi/scpi.py
index 7c4b20f..9e11c57 100644
--- a/src/scpi/scpi.py
+++ b/src/scpi/scpi.py
@@ -174,7 +174,7 @@ async def command(self, command, cmd_timeout=COMMAND_DEFAULT_TIMEOUT, abort_on_t
         """Sends a command, does not wait for response"""
         try:
 
-            async def _command() -> None:
+            async def _command(command: str) -> None:
                 """Wrap the actual work"""
                 nonlocal self
                 async with self.lock:


Test patch:
diff --git a/tests/test_scpi.py b/tests/test_scpi.py
index e0b6d2c..7c05ad7 100644
--- a/tests/test_scpi.py
+++ b/tests/test_scpi.py
@@ -4,4 +4,4 @@
 
 def test_version() -> None:
     """Make sure version matches expected"""
-    assert __version__ == "2.3.0"
+    assert __version__ == "2.3.1"