Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#140)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.8.1](astral-sh/ruff-pre-commit@v0.5.6...v0.8.1)
- [github.com/tox-dev/pyproject-fmt: 2.2.1 → v2.5.0](tox-dev/pyproject-fmt@2.2.1...v2.5.0)
- [github.com/abravalheri/validate-pyproject: v0.18 → v0.23](abravalheri/validate-pyproject@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 <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and CagtayFabry authored Dec 4, 2024
1 parent e374505 commit 8203cdd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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
21 changes: 14 additions & 7 deletions demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"metadata": {},
"outputs": [],
"source": [
"import abc\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
Expand All @@ -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",
" )"
]
},
{
Expand All @@ -44,20 +46,25 @@
" 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"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
Expand All @@ -75,7 +82,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "weldx real",
"display_name": "weldx",
"language": "python",
"name": "weldx"
},
Expand All @@ -89,7 +96,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down

0 comments on commit 8203cdd

Please sign in to comment.