From 0f00c96a0848d0c7a9bdb533a4a6e68e9c3b267d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:31:03 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v5.0.0) - [github.com/PyCQA/isort: 5.10.1 → 5.13.2](https://github.com/PyCQA/isort/compare/5.10.1...5.13.2) - [github.com/psf/black: 22.10.0 → 24.10.0](https://github.com/psf/black/compare/22.10.0...24.10.0) - [github.com/PyCQA/flake8: 5.0.4 → 7.1.1](https://github.com/PyCQA/flake8/compare/5.0.4...7.1.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 201a1ce..e5a3e4e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,20 +1,20 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v5.0.0 hooks: - id: check-merge-conflict - id: debug-statements - repo: https://github.com/PyCQA/isort - rev: "5.10.1" + rev: "5.13.2" hooks: - id: isort additional_dependencies: [toml] - repo: https://github.com/psf/black - rev: "22.10.0" + rev: "24.10.0" hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 7.1.1 hooks: - id: flake8 # - repo: https://github.com/pre-commit/mirrors-mypy From 6d7c671d668338d9cbaab3e7bca8975908539130 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:31:11 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sunglass/run_calculation.py | 12 ++++++------ sunglass/solar_cells.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sunglass/run_calculation.py b/sunglass/run_calculation.py index 554af0f..12309dc 100644 --- a/sunglass/run_calculation.py +++ b/sunglass/run_calculation.py @@ -78,9 +78,9 @@ def run_solar_cell_model(task, model): # units for key in current_element["options"]: if key in ["element", "x"]: - layer_properties[ - current_element["options"]["element"] - ] = current_element["options"]["x"] + layer_properties[current_element["options"]["element"]] = ( + current_element["options"]["x"] + ) else: layer_properties[key] = ( current_element["options"][key] * ps.conversion[key] @@ -122,9 +122,9 @@ def run_solar_cell_model(task, model): # units for key in current_child["options"]: if key in ["element", "x"]: - layer_properties[ - current_child["options"]["element"] - ] = current_child["options"]["x"] + layer_properties[current_child["options"]["element"]] = ( + current_child["options"]["x"] + ) else: layer_properties[key] = ( current_child["options"][key] * ps.conversion[key] diff --git a/sunglass/solar_cells.py b/sunglass/solar_cells.py index 4d2e9d8..7b9341f 100644 --- a/sunglass/solar_cells.py +++ b/sunglass/solar_cells.py @@ -626,9 +626,9 @@ def confirm_changes_to_junction(self, *args): """ item_id = self.solar_cell_list.focus() - junction_type = self.model["Solar cell"][item_id][ - "name" - ] = self.junction_type_var.get() + junction_type = self.model["Solar cell"][item_id]["name"] = ( + self.junction_type_var.get() + ) name = self.model["Solar cell"][item_id]["name"] = self.junction_name_var.get() options = ""