Skip to content

Commit

Permalink
ruff C408
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Nov 10, 2023
1 parent ea1e7ed commit 857715a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions py4DSTEM/process/wholepatternfit/wpf_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def show_model_grid(self, x=None, **plot_kwargs):
cols = int(np.ceil(np.sqrt(N)))
rows = (N + 1) // cols

kwargs = dict(constrained_layout=True)
kwargs = {"constrained_layout": True}
kwargs.update(plot_kwargs)
fig, ax = plt.subplots(rows, cols, **kwargs)

Expand Down Expand Up @@ -213,7 +213,7 @@ def show_lattice_points(
def show_fit_metrics(self, returnfig=False, **subplots_kwargs):
assert hasattr(self, "fit_metrics"), "Please run fitting first!"

kwargs = dict(figsize=(14, 12), constrained_layout=True)
kwargs = {"figsize": (14, 12), "constrained_layout": True}
kwargs.update(subplots_kwargs)
fig, ax = plt.subplots(2, 2, **kwargs)
im = ax[0, 0].matshow(self.fit_metrics["cost"].data, norm=mpl_c.LogNorm())
Expand Down
22 changes: 11 additions & 11 deletions py4DSTEM/visualize/overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def add_rectangles(ax, d):
kws = [
k for k in d.keys() if k not in ("lims", "color", "fill", "alpha", "linewidth")
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -145,7 +145,7 @@ def add_circles(ax, d):
for k in d.keys()
if k not in ("center", "R", "color", "fill", "alpha", "linewidth")
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -247,7 +247,7 @@ def add_annuli(ax, d):
for k in d.keys()
if k not in ("center", "radii", "color", "fill", "alpha", "linewidth")
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -387,7 +387,7 @@ def add_ellipses(ax, d):
"linestyle",
)
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -470,7 +470,7 @@ def add_points(ax, d):
for k in d.keys()
if k not in ("x", "y", "s", "scale", "pointcolor", "alpha", "open_circles")
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -521,7 +521,7 @@ def add_pointlabels(ax, d):
kws = [
k for k in d.keys() if k not in ("x", "y", "size", "color", "alpha", "labels")
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -649,7 +649,7 @@ def add_vector(ax, d):
"labelcolor",
)
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -701,7 +701,7 @@ def add_grid_overlay(ax, d):
for k in d.keys()
if k not in ("x0", "y0", "xL", "yL", "color", "alpha", "linewidth")
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -798,7 +798,7 @@ def add_scalebar(ax, d):
"ticks",
)
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -937,7 +937,7 @@ def add_cartesian_grid(ax, d):
"alpha",
)
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down Expand Up @@ -1103,7 +1103,7 @@ def add_polarelliptical_grid(ax, d):
"alpha",
)
]
kwargs = dict()
kwargs = {}
for k in kws:
kwargs[k] = d[k]

Expand Down

0 comments on commit 857715a

Please sign in to comment.