From 8203cdddf54e89e2a0bc504535d1f121276400e6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:45:55 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.6...v0.8.1) - [github.com/tox-dev/pyproject-fmt: 2.2.1 → v2.5.0](https://github.com/tox-dev/pyproject-fmt/compare/2.2.1...v2.5.0) - [github.com/abravalheri/validate-pyproject: v0.18 → v0.23](https://github.com/abravalheri/validate-pyproject/compare/v0.18...v0.23) * lint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Cagtay Fabry --- .pre-commit-config.yaml | 8 ++++---- demo.ipynb | 21 ++++++++++++++------- pyproject.toml | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) 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", ]