Skip to content

Commit

Permalink
ci: add autowalrus
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle committed Jan 9, 2024
1 parent d976606 commit 66a589d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
21 changes: 13 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
- id: rst-directive-colons

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8

Expand All @@ -69,17 +69,22 @@ repos:
- id: upgrade-type-hints
args: ["--futures=true"]

- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.2.2
hooks:
- id: auto-walrus

- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: "v4.0.0-alpha.8"
# hooks:
# - id: prettier

- repo: https://github.com/roy-ht/pre-commit-jupyter
rev: v1.2.1
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: jupyter-notebook-cleanup
- id: nbstripout
3 changes: 1 addition & 2 deletions docs/GenMultiDecay_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{
"cell_type": "markdown",
"metadata": {
"collapsed": true,
"pycharm": {
"is_executing": true,
"name": "#%% md\n"
Expand Down Expand Up @@ -417,4 +416,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
3 changes: 1 addition & 2 deletions phasespace/phasespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ def set_children(self, *children):
f"Have to set at least 2 children, not {len(children)} for a particle to decay"
)
# Check name clashes
name_clash = self._do_names_clash(children)
if name_clash:
if name_clash := self._do_names_clash(children):
raise KeyError(f"Particle name {name_clash} already used")
self.children = children
return self
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Scientific/Engineering :: Physics
keywords = TensorFlow, phasespace, HEP

Expand Down

0 comments on commit 66a589d

Please sign in to comment.