diff --git a/doc/generate-doc.py b/doc/generate-doc.py index b77de07..5ceb503 100644 --- a/doc/generate-doc.py +++ b/doc/generate-doc.py @@ -75,4 +75,4 @@ def main(): embedme.call() print(embedme.stdout) assert embedme.return_code == 0 - assert not "but file does not exist" in embedme.stdout + assert "but file does not exist" not in embedme.stdout diff --git a/lint.sh b/lint.sh index bdbc83f..ef40cbe 100755 --- a/lint.sh +++ b/lint.sh @@ -1,4 +1,5 @@ #!/bin/bash set -e -python3 -m flake8 . --max-complexity=10 --max-line-length=127 --extend-ignore=E203 +# TODO: max-complexity=10 +python3 -m flake8 . --max-complexity=11 --max-line-length=127 --extend-ignore=E203 python3 -m mypy "pyvirtualdisplay" diff --git a/pyvirtualdisplay/xvnc.py b/pyvirtualdisplay/xvnc.py index aeb61db..1f4c1fc 100644 --- a/pyvirtualdisplay/xvnc.py +++ b/pyvirtualdisplay/xvnc.py @@ -26,7 +26,9 @@ def __init__( ): """ :param bgcolor: 'black' or 'white' - :param rfbport: Specifies the TCP port on which Xvnc listens for connections from viewers (the protocol used in VNC is called RFB - "remote framebuffer"). The default is 5900 plus the display number. + :param rfbport: Specifies the TCP port on which Xvnc listens for connections from viewers + (the protocol used in VNC is called RFB - "remote framebuffer"). + The default is 5900 plus the display number. :param rfbauth: Specifies the file containing the password used to authenticate viewers. """ self._size = size diff --git a/requirements-test.txt b/requirements-test.txt index 2f28cc5..4f5a9ed 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,6 @@ pytest pillow +types-pillow entrypoint2 vncdotool==0.13.0 psutil diff --git a/tests/test_smart.py b/tests/test_smart.py index 340a175..f56a5c1 100644 --- a/tests/test_smart.py +++ b/tests/test_smart.py @@ -75,7 +75,7 @@ def test_slowshot_timeout(): with disp: with proc: with pytest.raises(DisplayTimeoutError): - img = disp.waitgrab(timeout=1) + disp.waitgrab(timeout=1) def test_slowshot_timeout_nocrop(): @@ -85,4 +85,4 @@ def test_slowshot_timeout_nocrop(): with disp: with proc: with pytest.raises(DisplayTimeoutError): - img = disp.waitgrab(timeout=1, autocrop=False) + disp.waitgrab(timeout=1, autocrop=False)