diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 32fd0ae..d02277f 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -12,9 +12,10 @@ jobs: run: | sudo apt update sudo apt install -y python3-pip python3-tk xvfb libxrandr2 libegl1 - pip3 install ogre-python + pip3 install ogre-python pylint - uses: actions/checkout@v4 - name: Test run: | + pylint ogre_mesh_viewer.py cd test xvfb-run timeout --preserve-status 5s python3 ../ogre_mesh_viewer.py cube.obj \ No newline at end of file diff --git a/ogre_mesh_viewer.py b/ogre_mesh_viewer.py index cab1771..6587a52 100755 --- a/ogre_mesh_viewer.py +++ b/ogre_mesh_viewer.py @@ -638,6 +638,6 @@ def shutdown(self): app.getRoot().startRendering() app.closeApp() except RuntimeError as e: - raise SystemExit(e) + raise SystemExit(e) from e if not app.restart: break diff --git a/pylintrc.toml b/pylintrc.toml new file mode 100644 index 0000000..4474ea7 --- /dev/null +++ b/pylintrc.toml @@ -0,0 +1,4 @@ +[tool.pylint] +extension-pkg-allow-list = "Ogre" +disable = ["R", "C", "attribute-defined-outside-init", "redefined-builtin", "redefined-outer-name", "unused-argument", "protected-access"] +enable = ["consider-using-f-string"]