From 3b995a3824f8fbe20155ab647cba9b51775e2d62 Mon Sep 17 00:00:00 2001
From: Oscar Gustafsson <oscar.gustafsson@gmail.com>
Date: Tue, 17 Jan 2023 17:42:22 +0100
Subject: [PATCH] Run pyupgrade

---
 .pre-commit-config.yaml     | 12 ++++++++----
 b_asic/schedule.py          |  2 +-
 b_asic/signal_flow_graph.py |  2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 48ee0308..a1d6f179 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,10 +2,14 @@ repos:
 -   repo: https://github.com/pre-commit/pre-commit-hooks
     rev: v2.3.0
     hooks:
-    -   id: check-yaml
-    -   id: end-of-file-fixer
-    -   id: trailing-whitespace
+    - id: check-added-large-files
+    - id: check-docstring-first
+    - id: check-yaml
+    - id: end-of-file-fixer
+      exclude_types: [svg]
+    - id: trailing-whitespace
+      exclude_types: [svg]
 -   repo: https://github.com/psf/black
     rev: 22.10.0
     hooks:
-    -   id: black
+    - id: black
diff --git a/b_asic/schedule.py b/b_asic/schedule.py
index ae41ba0b..9af31715 100644
--- a/b_asic/schedule.py
+++ b/b_asic/schedule.py
@@ -406,7 +406,7 @@ class Schedule:
                 ax.text(
                     -0.2,
                     end[1],
-                    "{}: {}".format(name, laps),
+                    f"{name}: {laps}",
                     verticalalignment="center",
                     horizontalalignment="right",
                 )
diff --git a/b_asic/signal_flow_graph.py b/b_asic/signal_flow_graph.py
index d089311c..1e5f1ccb 100644
--- a/b_asic/signal_flow_graph.py
+++ b/b_asic/signal_flow_graph.py
@@ -496,7 +496,7 @@ class SFG(AbstractOperation):
         Keyword arguments:
         type_name: The type_name of the desired components.
         """
-        reg = "{}[0-9]+".format(type_name)
+        reg = f"{type_name}[0-9]+"
         p = re.compile(reg)
         components = [
             val for key, val in self._components_by_id.items() if p.match(key)
-- 
GitLab