diff --git a/hexrd/ui/interactive_template.py b/hexrd/ui/interactive_template.py index 82e421e62..9b49d9665 100644 --- a/hexrd/ui/interactive_template.py +++ b/hexrd/ui/interactive_template.py @@ -6,7 +6,9 @@ from skimage.draw import polygon -from hexrd.ui.constants import KEY_ROTATE_ANGLE_FINE, KEY_TRANSLATE_DELTA, ViewType +from hexrd.ui.constants import ( + KEY_ROTATE_ANGLE_FINE, KEY_TRANSLATE_DELTA, ViewType +) from hexrd.ui.hexrd_config import HexrdConfig from hexrd.ui.utils import has_nan @@ -25,7 +27,8 @@ def __init__(self, canvas, detector, axes=None, instrument=None): self.detector = detector self.instrument = instrument self._static = True - self.axis_image = axes.get_images()[0] if axes else canvas.axes_images[0] + self.axis_image = ( + axes.get_images()[0] if axes else canvas.axes_images[0]) self._key_angle = KEY_ROTATE_ANGLE_FINE self.button_press_cid = None @@ -112,7 +115,8 @@ def update_style(self, style=None, width=None, color=None): def update_position(self): pos = None if self.instrument is not None: - pos = HexrdConfig().boundary_position(self.instrument, self.detector) + pos = HexrdConfig().boundary_position( + self.instrument, self.detector) if pos is None: self.center = self.get_midpoint() else: diff --git a/hexrd/ui/llnl_import_tool_dialog.py b/hexrd/ui/llnl_import_tool_dialog.py index a6bb5ac97..a04abe92b 100644 --- a/hexrd/ui/llnl_import_tool_dialog.py +++ b/hexrd/ui/llnl_import_tool_dialog.py @@ -399,7 +399,12 @@ def swap_bounds_for_cropped(self): module=hexrd_resources, file_name=f'TARDIS_IMAGE-PLATE-3_bnd_cropped.txt' ) - kwargs = {'fill': False, 'lw': width, 'color': color, 'linestyle': '--'} + kwargs = { + 'fill': False, + 'lw': width, + 'color': color, + 'linestyle': '--' + } self.it.create_polygon(verts, **kwargs) self.update_bbox_width(1330) self.update_bbox_height(238) diff --git a/hexrd/ui/mask_regions_dialog.py b/hexrd/ui/mask_regions_dialog.py index fa004315a..04ee239af 100644 --- a/hexrd/ui/mask_regions_dialog.py +++ b/hexrd/ui/mask_regions_dialog.py @@ -85,7 +85,7 @@ def create_interactive_template(self): } self.interactive_template = InteractiveTemplate( self.canvas, self.det, axes=self.axes) - self.interactive_template.create_polygon([[0,0]], **kwargs) + self.interactive_template.create_polygon([[0, 0]], **kwargs) self.interactive_template.update_style(color='red') self.interactive_template.key_rotation_angle = KEY_ROTATE_ANGLE_COARSE self.added_templates.append(self.det) @@ -220,7 +220,7 @@ def button_pressed(self, event): self.create_interactive_template() # For animating the patch - self.canvas.draw() # Force canvas re-draw before caching + self.canvas.draw() # Force canvas re-draw before caching self.bg_cache = self.canvas.copy_from_bbox(self.axes.bbox) self.drawing_axes = self.axes