diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48ee0308d3ccab3f18b36291d2b8d1183a4a563e..a1d6f179bf3f50fcd12c407d65b040d41bb7b0bf 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 ae41ba0b21867ddc9c5bc0f32dccf0787907a5e0..9af317154f7f44b264152e2101354d453afceea4 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 d089311c3807a8f134e162094dd7323996f75105..1e5f1ccb99e6716b3d55c8a1f2cfe842042d5054 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)