diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a95a4e..2bd710e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ ci: submodules: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: trailing-whitespace args: [--markdown-linebreak-ext=md] @@ -19,7 +19,7 @@ repos: # ----- Python formatting ----- - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.5.6 + rev: v0.8.1 hooks: # Run the linter. - id: ruff @@ -29,10 +29,10 @@ repos: # Run the formatter. - id: ruff-format - repo: https://github.com/tox-dev/pyproject-fmt - rev: 2.2.1 + rev: v2.5.0 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.18 + rev: v0.23 hooks: - id: validate-pyproject diff --git a/demo.ipynb b/demo.ipynb index b6cc177..dd779d9 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -6,7 +6,6 @@ "metadata": {}, "outputs": [], "source": [ - "import abc\n", "%load_ext autoreload\n", "%autoreload 2" ] @@ -19,11 +18,14 @@ "source": [ "import inspect\n", "from unittest.mock import MagicMock\n", + "\n", "from weldx_widgets.widget_base import WidgetBase as base\n", "\n", + "\n", "def all_subclasses(cls):\n", " return set(cls.__subclasses__()).union(\n", - " [s for c in cls.__subclasses__() for s in all_subclasses(c)])" + " [s for c in cls.__subclasses__() for s in all_subclasses(c)]\n", + " )" ] }, { @@ -44,13 +46,17 @@ " for k, v in args.parameters.items():\n", " if k == \"self\":\n", " continue\n", - " if k!= \"kwargs\" and v.POSITIONAL_OR_KEYWORD and v.default is inspect.Parameter.empty:\n", + " if (\n", + " k != \"kwargs\"\n", + " and v.POSITIONAL_OR_KEYWORD\n", + " and v.default is inspect.Parameter.empty\n", + " ):\n", " _mock_args[k] = MagicMock()\n", - " print(\"mocked \",k,v)\n", + " print(\"mocked \", k, v) # noqa: T201\n", " try:\n", " all_widgets.append(cls(**_mock_args))\n", " except TypeError as te:\n", - " print(cls, te)\n", + " print(cls, te) # noqa: T201\n", " continue" ] }, @@ -58,6 +64,7 @@ "cell_type": "code", "execution_count": null, "metadata": { + "collapsed": false, "jupyter": { "outputs_hidden": false }, @@ -75,7 +82,7 @@ ], "metadata": { "kernelspec": { - "display_name": "weldx real", + "display_name": "weldx", "language": "python", "name": "weldx" }, @@ -89,7 +96,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.6" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/pyproject.toml b/pyproject.toml index 72cb647..e9c83ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Physics", ]