From 60cf5e3a03cd3b1ff8846338af4937f6a696e666 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:32:19 +0000 Subject: [PATCH] style: pre-commit fixes --- examples/example.ipynb | 100 +++++++++--------- .../include/geant4_application/DataModel.h | 2 +- 2 files changed, 52 insertions(+), 50 deletions(-) diff --git a/examples/example.ipynb b/examples/example.ipynb index a93f49f..4f1fa65 100644 --- a/examples/example.ipynb +++ b/examples/example.ipynb @@ -1,52 +1,54 @@ { - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "initial_id", - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "from geant4_python_application import Application, basic_gdml\n", - "\n", - "app = Application()\n", - "\n", - "app.setup_manager(n_threads=0)\n", - "app.setup_physics()\n", - "app.setup_detector(gdml=basic_gdml)\n", - "app.setup_action()\n", - "\n", - "app.initialize()\n", - "\n", - "print(f\"Random seed: {app.random_seed}\")\n", - "\n", - "events = app.run(n_events=100)\n", - "\n", - "print(events)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.6" - } + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "initial_id", + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from __future__ import annotations\n", + "\n", + "from geant4_python_application import Application, basic_gdml\n", + "\n", + "app = Application()\n", + "\n", + "app.setup_manager(n_threads=0)\n", + "app.setup_physics()\n", + "app.setup_detector(gdml=basic_gdml)\n", + "app.setup_action()\n", + "\n", + "app.initialize()\n", + "\n", + "print(f\"Random seed: {app.random_seed}\")\n", + "\n", + "events = app.run(n_events=100)\n", + "\n", + "print(events)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" }, - "nbformat": 4, - "nbformat_minor": 5 + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 } diff --git a/src/geant4_application/include/geant4_application/DataModel.h b/src/geant4_application/include/geant4_application/DataModel.h index a5dba6c..335d3d5 100644 --- a/src/geant4_application/include/geant4_application/DataModel.h +++ b/src/geant4_application/include/geant4_application/DataModel.h @@ -150,7 +150,7 @@ struct Builders { StepPositionBuilder step_position; StepMomentumBuilder step_momentum; - Builders(const std::unordered_set& fields) : fields(fields){}; + Builders(const std::unordered_set& fields) : fields(fields) {}; };