From 93e28ef0e50dae83598b33c7785c2bf06e7ee715 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Tue, 10 Jan 2023 11:28:55 -0600
Subject: [PATCH] Placate flake8-comprehensions

---
 examples/sym-exp-complexity.py |  2 +-
 sumpy/cse.py                   |  9 ++++----
 sumpy/e2e.py                   | 39 +++++++++++++++++-----------------
 sumpy/e2p.py                   | 12 +++++------
 sumpy/expansion/__init__.py    |  2 +-
 sumpy/expansion/m2l.py         | 18 ++++++++--------
 sumpy/fmm.py                   | 16 +++++++-------
 sumpy/kernel.py                |  2 +-
 sumpy/p2e.py                   |  8 +++----
 sumpy/p2p.py                   | 34 ++++++++++++++---------------
 sumpy/qbx.py                   | 10 ++++-----
 sumpy/tools.py                 |  4 ++--
 sumpy/toys.py                  | 16 +++++++-------
 13 files changed, 86 insertions(+), 86 deletions(-)

diff --git a/examples/sym-exp-complexity.py b/examples/sym-exp-complexity.py
index 779bfc36..138c9c87 100644
--- a/examples/sym-exp-complexity.py
+++ b/examples/sym-exp-complexity.py
@@ -55,7 +55,7 @@ def find_flops():
         flops = lp.get_op_map(loopy_knl).filter_by(dtype=[flop_type]).sum()
         flop_counts.append(
                 flops.eval_with_dict(
-                    dict(isrc_start=0, isrc_stop=1, ntgt_boxes=1)))
+                    {"isrc_start": 0, "isrc_stop": 1, "ntgt_boxes": 1}))
 
     print(orders)
     print(flop_counts)
diff --git a/sumpy/cse.py b/sumpy/cse.py
index 49ba690f..f7023aa1 100644
--- a/sumpy/cse.py
+++ b/sumpy/cse.py
@@ -227,8 +227,7 @@ class FuncArgTracker:
         """
         iarg = iter(argset)
 
-        indices = {
-            fi for fi in self.arg_to_funcset[next(iarg)]}
+        indices = set(self.arg_to_funcset[next(iarg)])
 
         if restrict_to_funcset is not None:
             indices &= restrict_to_funcset
@@ -366,7 +365,7 @@ def opt_cse(exprs):
     :arg exprs: A list of sympy expressions: the expressions to optimize.
     :return: A dictionary of expression substitutions
     """
-    opt_subs = dict()
+    opt_subs = {}
 
     from sumpy.tools import OrderedSet
     adds = OrderedSet()
@@ -446,7 +445,7 @@ def tree_cse(exprs, symbols, opt_subs=None):
     :return: A pair (replacements, reduced exprs)
     """
     if opt_subs is None:
-        opt_subs = dict()
+        opt_subs = {}
 
     # {{{ find repeated sub-expressions and used symbols
 
@@ -498,7 +497,7 @@ def tree_cse(exprs, symbols, opt_subs=None):
 
     replacements = []
 
-    subs = dict()
+    subs = {}
 
     def rebuild(expr):
         if not isinstance(expr, (Basic, Unevaluated)):
diff --git a/sumpy/e2e.py b/sumpy/e2e.py
index 89df2789..c357082b 100644
--- a/sumpy/e2e.py
+++ b/sumpy/e2e.py
@@ -262,7 +262,7 @@ class E2EFromCSR(E2EBase):
                 assumptions="ntgt_boxes>=1",
                 silenced_warnings="write_race(write_expn*)",
                 default_offset=lp.auto,
-                fixed_parameters=dict(dim=self.dim),
+                fixed_parameters={"dim": self.dim},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION
                 )
 
@@ -492,11 +492,12 @@ class M2LUsingTranslationClassesDependentData(E2EFromCSR):
                 name=self.name,
                 assumptions="ntgt_boxes>=1",
                 default_offset=lp.auto,
-                fixed_parameters=dict(dim=self.dim,
-                        m2l_translation_classes_dependent_ndata=(
+                fixed_parameters={
+                        "dim": self.dim,
+                        "m2l_translation_classes_dependent_ndata": (
                             m2l_translation_classes_dependent_ndata),
-                        ncoeff_tgt=ncoeff_tgt,
-                        ncoeff_src=ncoeff_src),
+                        "ncoeff_tgt": ncoeff_tgt,
+                        "ncoeff_src": ncoeff_src},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION,
                 silenced_warnings="write_race(write_e2e*)",
                 )
@@ -600,10 +601,10 @@ class M2LGenerateTranslationClassesDependentData(E2EBase):
                 name=self.name,
                 assumptions="ntranslation_classes>=1",
                 default_offset=lp.auto,
-                fixed_parameters=dict(
-                    dim=self.dim,
-                    m2l_translation_classes_dependent_ndata=(
-                        m2l_translation_classes_dependent_ndata)),
+                fixed_parameters={
+                    "dim": self.dim,
+                    "m2l_translation_classes_dependent_ndata": (
+                        m2l_translation_classes_dependent_ndata)},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION
                 )
 
@@ -704,9 +705,9 @@ class M2LPreprocessMultipole(E2EBase):
                 ] + gather_loopy_arguments([self.src_expansion, self.tgt_expansion]),
                 name=self.name,
                 assumptions="nsrc_boxes>=1",
-                fixed_parameters=dict(
-                    nsrc_coeffs=nsrc_coeffs,
-                    npreprocessed_src_coeffs=npreprocessed_src_coeffs),
+                fixed_parameters={
+                    "nsrc_coeffs": nsrc_coeffs,
+                    "npreprocessed_src_coeffs": npreprocessed_src_coeffs},
                 default_offset=lp.auto,
                 lang_version=lp.MOST_RECENT_LANGUAGE_VERSION,
                 )
@@ -793,11 +794,11 @@ class M2LPostprocessLocal(E2EBase):
                 name=self.name,
                 assumptions="ntgt_boxes>=1",
                 default_offset=lp.auto,
-                fixed_parameters=dict(
-                    dim=self.dim,
-                    nsrc_coeffs=ntgt_coeffs_before_postprocessing,
-                    ntgt_coeffs=ntgt_coeffs,
-                ),
+                fixed_parameters={
+                    "dim": self.dim,
+                    "nsrc_coeffs": ntgt_coeffs_before_postprocessing,
+                    "ntgt_coeffs": ntgt_coeffs,
+                },
                 lang_version=MOST_RECENT_LANGUAGE_VERSION
                 )
 
@@ -913,7 +914,7 @@ class E2EFromChildren(E2EBase):
                 name=self.name,
                 assumptions="ntgt_boxes>=1",
                 silenced_warnings="write_race(write_expn*)",
-                fixed_parameters=dict(dim=self.dim, nchildren=2**self.dim),
+                fixed_parameters={"dim": self.dim, "nchildren": 2**self.dim},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         for knl in [self.src_expansion.kernel, self.tgt_expansion.kernel]:
@@ -1017,7 +1018,7 @@ class E2EFromParent(E2EBase):
                 ] + gather_loopy_arguments([self.src_expansion, self.tgt_expansion]),
                 name=self.name, assumptions="ntgt_boxes>=1",
                 silenced_warnings="write_race(write_expn*)",
-                fixed_parameters=dict(dim=self.dim, nchildren=2**self.dim),
+                fixed_parameters={"dim": self.dim, "nchildren": 2**self.dim},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         for knl in [self.src_expansion.kernel, self.tgt_expansion.kernel]:
diff --git a/sumpy/e2p.py b/sumpy/e2p.py
index 611b2718..a62236b0 100644
--- a/sumpy/e2p.py
+++ b/sumpy/e2p.py
@@ -198,7 +198,7 @@ class E2PFromSingleBox(E2PBase):
                 assumptions="ntgt_boxes>=1",
                 silenced_warnings="write_race(write_result*)",
                 default_offset=lp.auto,
-                fixed_parameters=dict(dim=self.dim, nresults=len(result_names)),
+                fixed_parameters={"dim": self.dim, "nresults": len(result_names)},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
@@ -210,7 +210,7 @@ class E2PFromSingleBox(E2PBase):
     def get_optimized_kernel(self):
         # FIXME
         knl = self.get_kernel()
-        knl = lp.tag_inames(knl, dict(itgt_box="g.0"))
+        knl = lp.tag_inames(knl, {"itgt_box": "g.0"})
         knl = self._allow_redundant_execution_of_knl_scaling(knl)
         knl = lp.set_options(knl,
                 enforce_variable_access_ordered="no_check")
@@ -312,9 +312,9 @@ class E2PFromCSR(E2PBase):
                 assumptions="ntgt_boxes>=1",
                 silenced_warnings="write_race(write_result*)",
                 default_offset=lp.auto,
-                fixed_parameters=dict(
-                    dim=self.dim,
-                    nresults=len(result_names)),
+                fixed_parameters={
+                        "dim": self.dim,
+                        "nresults": len(result_names)},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
@@ -327,7 +327,7 @@ class E2PFromCSR(E2PBase):
     def get_optimized_kernel(self):
         # FIXME
         knl = self.get_kernel()
-        knl = lp.tag_inames(knl, dict(itgt_box="g.0"))
+        knl = lp.tag_inames(knl, {"itgt_box": "g.0"})
         knl = self._allow_redundant_execution_of_knl_scaling(knl)
         knl = lp.set_options(knl,
                 enforce_variable_access_ordered="no_check")
diff --git a/sumpy/expansion/__init__.py b/sumpy/expansion/__init__.py
index 8bc04ae5..d4ef6e6a 100644
--- a/sumpy/expansion/__init__.py
+++ b/sumpy/expansion/__init__.py
@@ -559,7 +559,7 @@ class LinearPDEBasedExpansionTermsWrangler(ExpansionTermsWrangler):
     def get_full_coefficient_identifiers(self):
         identifiers = super().get_full_coefficient_identifiers()
         key = self._get_mi_ordering_key()
-        return list(sorted(identifiers, key=key))
+        return sorted(identifiers, key=key)
 
     @memoize_method
     def get_stored_ids_and_unscaled_projection_matrix(self):
diff --git a/sumpy/expansion/m2l.py b/sumpy/expansion/m2l.py
index 1845f1d3..dbcc7d26 100644
--- a/sumpy/expansion/m2l.py
+++ b/sumpy/expansion/m2l.py
@@ -170,7 +170,7 @@ class M2LTranslationBase(ABC):
         When FFT is turned on, the output expressions are assumed to be
         transformed into Fourier space at the end by the caller.
         """
-        return tuple()
+        return ()
 
     def translation_classes_dependent_ndata(self, tgt_expansion, src_expansion):
         """Return the number of expressions returned by
@@ -247,7 +247,7 @@ class M2LTranslationBase(ABC):
         key_hash.update(type(self).__name__.encode("utf8"))
 
     def optimize_loopy_kernel(self, knl, tgt_expansion, src_expansion):
-        return lp.tag_inames(knl, dict(itgt_box="g.0"))
+        return lp.tag_inames(knl, {"itgt_box": "g.0"})
 
 
 # }}} M2LTranslationBase
@@ -443,8 +443,8 @@ class VolumeTaylorM2LTranslation(M2LTranslationBase):
         circulant_matrix_mis, _, _ = \
             self._translation_classes_dependent_data_mis(tgt_expansion,
                 src_expansion)
-        circulant_matrix_ident_to_index = dict((ident, i) for i, ident in
-            enumerate(circulant_matrix_mis))
+        circulant_matrix_ident_to_index = {
+                ident: i for i, ident in enumerate(circulant_matrix_mis)}
 
         ncoeff_src = len(src_expansion.get_coefficient_identifiers())
         ncoeff_preprocessed = self.preprocess_multipole_nexprs(tgt_expansion,
@@ -495,7 +495,7 @@ class VolumeTaylorM2LTranslation(M2LTranslationBase):
                 ...],
             name="m2l_preprocess_inner",
             lang_version=lp.MOST_RECENT_LANGUAGE_VERSION,
-            fixed_parameters=dict(noutput_coeffs=ncoeff_preprocessed),
+            fixed_parameters={"noutput_coeffs": ncoeff_preprocessed},
         )
 
     def postprocess_local_exprs(self, tgt_expansion, src_expansion, m2l_result,
@@ -524,8 +524,8 @@ class VolumeTaylorM2LTranslation(M2LTranslationBase):
         circulant_matrix_mis, needed_vector_terms, _ = \
             self._translation_classes_dependent_data_mis(tgt_expansion,
                 src_expansion)
-        circulant_matrix_ident_to_index = dict((ident, i) for i, ident in
-                            enumerate(circulant_matrix_mis))
+        circulant_matrix_ident_to_index = {ident: i for i, ident in
+                            enumerate(circulant_matrix_mis)}
 
         ncoeff_tgt = len(tgt_expansion.get_coefficient_identifiers())
         ncoeff_before_postprocessed = self.postprocess_local_nexprs(tgt_expansion,
@@ -758,7 +758,7 @@ class VolumeTaylorM2LWithFFT(VolumeTaylorM2LWithPreprocessedMultipoles):
 
         knl = lp.split_iname(knl, "icoeff_tgt", 32, inner_iname="inner",
                 inner_tag="l.0")
-        knl = lp.tag_inames(knl, dict(itgt_box="g.0"))
+        knl = lp.tag_inames(knl, {"itgt_box": "g.0"})
         return knl
 
 
@@ -1012,7 +1012,7 @@ def translation_classes_dependent_data_loopy_knl(tgt_expansion, src_expansion,
     from sumpy.tools import to_complex_dtype
     insns = to_loopy_insns(
             sac.assignments.items(),
-            vector_names=set(["d"]),
+            vector_names=frozenset({"d"}),
             pymbolic_expr_maps=[tgt_expansion.get_code_transformer()],
             retain_names=tgt_coeff_names,
             complex_dtype=to_complex_dtype(result_dtype),
diff --git a/sumpy/fmm.py b/sumpy/fmm.py
index 00ac1f38..86b4412a 100644
--- a/sumpy/fmm.py
+++ b/sumpy/fmm.py
@@ -540,16 +540,16 @@ class SumpyExpansionWrangler(ExpansionWranglerInterface):
     # use a FilteredTargetListsInTreeOrder object.
 
     def box_source_list_kwargs(self):
-        return dict(
-                box_source_starts=self.tree.box_source_starts,
-                box_source_counts_nonchild=self.tree.box_source_counts_nonchild,
-                sources=self.tree.sources)
+        return {
+                "box_source_starts": self.tree.box_source_starts,
+                "box_source_counts_nonchild": self.tree.box_source_counts_nonchild,
+                "sources": self.tree.sources}
 
     def box_target_list_kwargs(self):
-        return dict(
-                box_target_starts=self.tree.box_target_starts,
-                box_target_counts_nonchild=self.tree.box_target_counts_nonchild,
-                targets=self.tree.targets)
+        return {
+                "box_target_starts": self.tree.box_target_starts,
+                "box_target_counts_nonchild": self.tree.box_target_counts_nonchild,
+                "targets": self.tree.targets}
 
     # }}}
 
diff --git a/sumpy/kernel.py b/sumpy/kernel.py
index 70dd14e2..7eb70ff7 100644
--- a/sumpy/kernel.py
+++ b/sumpy/kernel.py
@@ -1009,7 +1009,7 @@ class AxisSourceDerivative(DerivativeBase):
     def get_derivative_coeff_dict_at_source(self, expr_dict):
         expr_dict = self.inner_kernel.get_derivative_coeff_dict_at_source(
             expr_dict)
-        result = dict()
+        result = {}
         for mi, coeff in expr_dict.items():
             new_mi = list(mi)
             new_mi[self.axis] += 1
diff --git a/sumpy/p2e.py b/sumpy/p2e.py
index 9532f6ec..c41dbb48 100644
--- a/sumpy/p2e.py
+++ b/sumpy/p2e.py
@@ -213,8 +213,8 @@ class P2EFromSingleBox(P2EBase):
                 assumptions="nsrc_boxes>=1",
                 silenced_warnings="write_race(write_expn*)",
                 default_offset=lp.auto,
-                fixed_parameters=dict(dim=self.dim,
-                    strength_count=self.strength_count),
+                fixed_parameters={
+                    "dim": self.dim, "strength_count": self.strength_count},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         for knl in self.source_kernels:
@@ -334,8 +334,8 @@ class P2EFromCSR(P2EBase):
                 assumptions="ntgt_boxes>=1",
                 silenced_warnings="write_race(write_expn*)",
                 default_offset=lp.auto,
-                fixed_parameters=dict(dim=self.dim,
-                    strength_count=self.strength_count),
+                fixed_parameters={"dim": self.dim,
+                                  "strength_count": self.strength_count},
                 lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         for knl in self.source_kernels:
diff --git a/sumpy/p2p.py b/sumpy/p2p.py
index 385e90b0..dc8368da 100644
--- a/sumpy/p2p.py
+++ b/sumpy/p2p.py
@@ -236,10 +236,10 @@ class P2P(P2PBase):
             assumptions="nsources>=1 and ntargets>=1",
             name=self.name,
             default_offset=lp.auto,
-            fixed_parameters=dict(
-                dim=self.dim,
-                nstrengths=self.strength_count,
-                nresults=len(self.target_kernels)),
+            fixed_parameters={
+                "dim": self.dim,
+                "nstrengths": self.strength_count,
+                "nresults": len(self.target_kernels)},
             lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
@@ -301,7 +301,7 @@ class P2PMatrixGenerator(P2PBase):
             arguments,
             assumptions="nsources>=1 and ntargets>=1",
             name=self.name,
-            fixed_parameters=dict(dim=self.dim),
+            fixed_parameters={"dim": self.dim},
             lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
@@ -380,12 +380,12 @@ class P2PMatrixSubsetGenerator(P2PBase):
             assumptions="nresult>=1",
             silenced_warnings="write_race(write_p2p*)",
             name=self.name,
-            fixed_parameters=dict(dim=self.dim),
+            fixed_parameters={"dim": self.dim},
             lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
-        loopy_knl = lp.add_dtypes(loopy_knl,
-            dict(nsources=np.int32, ntargets=np.int32))
+        loopy_knl = lp.add_dtypes(
+                loopy_knl, {"nsources": np.int32, "ntargets": np.int32})
 
         for knl in self.target_kernels + self.source_kernels:
             loopy_knl = knl.prepare_loopy_kernel(loopy_knl)
@@ -620,17 +620,17 @@ class P2PFromCSR(P2PBase):
             name=self.name,
             silenced_warnings=["write_race(write_csr*)", "write_race(prefetch_src)",
                 "write_race(prefetch_charge)"],
-            fixed_parameters=dict(
-                dim=self.dim,
-                nstrengths=self.strength_count,
-                nsplit=nsplit,
-                src_outer_limit=src_outer_limit,
-                tgt_outer_limit=tgt_outer_limit,
-                noutputs=len(self.target_kernels)),
+            fixed_parameters={
+                "dim": self.dim,
+                "nstrengths": self.strength_count,
+                "nsplit": nsplit,
+                "src_outer_limit": src_outer_limit,
+                "tgt_outer_limit": tgt_outer_limit,
+                "noutputs": len(self.target_kernels)},
             lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
-        loopy_knl = lp.add_dtypes(loopy_knl,
-            dict(nsources=np.int32, ntargets=np.int32))
+        loopy_knl = lp.add_dtypes(
+                loopy_knl, {"nsources": np.int32, "ntargets": np.int32})
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
         loopy_knl = lp.tag_inames(loopy_knl, "istrength*:unr")
diff --git a/sumpy/qbx.py b/sumpy/qbx.py
index a3042ef9..bd9d8fd2 100644
--- a/sumpy/qbx.py
+++ b/sumpy/qbx.py
@@ -272,7 +272,7 @@ class LayerPotential(LayerPotentialBase):
             assumptions="ntargets>=1 and nsources>=1",
             default_offset=lp.auto,
             silenced_warnings="write_race(write_lpot*)",
-            fixed_parameters=dict(dim=self.dim),
+            fixed_parameters={"dim": self.dim},
             lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
@@ -349,7 +349,7 @@ class LayerPotentialMatrixGenerator(LayerPotentialBase):
             name=self.name,
             assumptions="ntargets>=1 and nsources>=1",
             default_offset=lp.auto,
-            fixed_parameters=dict(dim=self.dim),
+            fixed_parameters={"dim": self.dim},
             lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
@@ -429,12 +429,12 @@ class LayerPotentialMatrixSubsetGenerator(LayerPotentialBase):
             assumptions="nresult>=1",
             default_offset=lp.auto,
             silenced_warnings="write_race(write_lpot*)",
-            fixed_parameters=dict(dim=self.dim),
+            fixed_parameters={"dim": self.dim},
             lang_version=MOST_RECENT_LANGUAGE_VERSION)
 
         loopy_knl = lp.tag_inames(loopy_knl, "idim*:unr")
-        loopy_knl = lp.add_dtypes(loopy_knl,
-            dict(nsources=np.int32, ntargets=np.int32))
+        loopy_knl = lp.add_dtypes(
+                loopy_knl, {"nsources": np.int32, "ntargets": np.int32})
 
         for knl in self.source_kernels + self.target_kernels:
             loopy_knl = knl.prepare_loopy_kernel(loopy_knl)
diff --git a/sumpy/tools.py b/sumpy/tools.py
index 3d79ded5..5dd536c9 100644
--- a/sumpy/tools.py
+++ b/sumpy/tools.py
@@ -1101,8 +1101,8 @@ def loopy_fft(shape, inverse, complex_dtype, index_dtype=None,
                 expression=exp_table[table_idx % n],
                 id=f"exp_{ilev}",
                 depends_on=frozenset([f"idx_{ilev}"]),
-                within_inames=frozenset(map(lambda x: x.name,
-                    [*broadcast_dims, iN1_sum, iN1, iN2])),
+                within_inames=frozenset({x.name for x in
+                    [*broadcast_dims, iN1_sum, iN1, iN2]}),
                 temp_var_type=lp.Optional(complex_dtype)),
             lp.Assignment(
                 assignee=x[(*broadcast_dims, ifft + nfft * (iN1*N2 + iN2))],
diff --git a/sumpy/toys.py b/sumpy/toys.py
index 12e85031..9fa67cbc 100644
--- a/sumpy/toys.py
+++ b/sumpy/toys.py
@@ -735,10 +735,10 @@ def draw_annotation(to_pt, from_pt, label, arrowprops=None, **kwargs):
 
     import matplotlib.pyplot as plt
 
-    my_arrowprops = dict(
-            facecolor="black",
-            edgecolor="black",
-            arrowstyle="->")
+    my_arrowprops = {
+            "facecolor": "black",
+            "edgecolor": "black",
+            "arrowstyle": "->"}
 
     my_arrowprops.update(arrowprops)
 
@@ -784,9 +784,9 @@ class SchematicVisitor:
         #
         # ------> M
 
-        text_kwargs = dict(
-                verticalalignment="center",
-                horizontalalignment="center")
+        text_kwargs = {
+                "verticalalignment": "center",
+                "horizontalalignment": "center"}
 
         label = "${}_{{{}}}$".format(
                 type(psource).__name__[0].lower().replace("l", "\\ell"),
@@ -805,7 +805,7 @@ class SchematicVisitor:
             font_size = mpl.rcParams["font.size"]
             shrinkB = 7/8 * font_size  # noqa
 
-        arrowprops = dict(shrinkB=shrinkB, arrowstyle="<|-")
+        arrowprops = {"shrinkB": shrinkB, "arrowstyle": "<|-"}
 
         draw_annotation(psource.derived_from.center, psource.center, label,
                         arrowprops, **text_kwargs)
-- 
GitLab