python-tinyscript icon indicating copy to clipboard operation
python-tinyscript copied to clipboard

error with patchy/api.py

Open razorwif opened this issue 3 years ago • 0 comments

Salut :), petit soucis avec le def _getlength(self) concernant l'api.py de patchy.

File "/usr/local/lib/python3.10/dist-packages/tinyscript-1.26.0-py3.10.egg/tinyscript/helpers/data/utils.py", line 24, in <module>
    patchy.replace(bitstring.Bits._getlength, """
  File "/usr/local/lib/python3.10/dist-packages/patchy/api.py", line 51, in replace
    _assert_ast_equal(current_source, expected_source, func.__name__)
  File "/usr/local/lib/python3.10/dist-packages/patchy/api.py", line 345, in _assert_ast_equal
    raise ValueError(msg)
ValueError: The code of '_getlength' has changed from expected.

The current code is:
def _getlength(self) -> int:
    """Return the length of the bitstring in bits."""
    return self._datastore.bitlength

The expected code is:

def _getlength(self):
    """Return the length of the bitstring in bits."""
    return self._datastore.bitlength  

razorwif avatar Sep 11 '22 08:09 razorwif