From e48c022d7e5c586499e17fe516c428e89843bcda Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" Date: Thu, 26 Oct 2023 15:25:54 +0000 Subject: [PATCH] Commit formatting and linting fixes --- src/laue_dials/__init__.py | 6 ++++-- src/laue_dials/algorithms/laue.py | 5 ++--- src/laue_dials/command_line/index.py | 6 ++++-- src/laue_dials/command_line/integrate.py | 3 ++- src/laue_dials/command_line/optimize_indexing.py | 3 ++- src/laue_dials/command_line/plot_wavelengths.py | 3 ++- src/laue_dials/command_line/predict.py | 3 ++- src/laue_dials/command_line/refine.py | 7 ++----- src/laue_dials/command_line/sequence_to_stills.py | 3 ++- 9 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/laue_dials/__init__.py b/src/laue_dials/__init__.py index e451f10..5e28345 100644 --- a/src/laue_dials/__init__.py +++ b/src/laue_dials/__init__.py @@ -2,9 +2,11 @@ if sys.version_info[:2] >= (3, 8): # TODO: Import directly (no need for conditional) when `python_requires = >= 3.8` - from importlib.metadata import PackageNotFoundError, version # pragma: no cover + from importlib.metadata import (PackageNotFoundError, # pragma: no cover + version) else: - from importlib_metadata import PackageNotFoundError, version # pragma: no cover + from importlib_metadata import (PackageNotFoundError, # pragma: no cover + version) try: # Change here if project is renamed and does not equal the package name diff --git a/src/laue_dials/algorithms/laue.py b/src/laue_dials/algorithms/laue.py index 7b989d1..491eccf 100644 --- a/src/laue_dials/algorithms/laue.py +++ b/src/laue_dials/algorithms/laue.py @@ -100,9 +100,8 @@ def gen_beam_models(expts, refls): # Imports from copy import deepcopy - from dials.algorithms.refinement.prediction.managed_predictors import ( - ExperimentsPredictorFactory, - ) + from dials.algorithms.refinement.prediction.managed_predictors import \ + ExperimentsPredictorFactory # Instantiate new ExperimentList/reflection_table new_expts = ExperimentList() diff --git a/src/laue_dials/command_line/index.py b/src/laue_dials/command_line/index.py index e36f80a..70741df 100644 --- a/src/laue_dials/command_line/index.py +++ b/src/laue_dials/command_line/index.py @@ -8,9 +8,11 @@ import libtbx.phil from dials.util import show_mail_handle_errors -from dials.util.options import ArgumentParser, reflections_and_experiments_from_files +from dials.util.options import (ArgumentParser, + reflections_and_experiments_from_files) -from laue_dials.algorithms.monochromatic import initial_index, scan_varying_refine +from laue_dials.algorithms.monochromatic import (initial_index, + scan_varying_refine) logger = logging.getLogger("laue-dials.command_line.index") diff --git a/src/laue_dials/command_line/integrate.py b/src/laue_dials/command_line/integrate.py index 3886dd3..0ef9e6c 100644 --- a/src/laue_dials/command_line/integrate.py +++ b/src/laue_dials/command_line/integrate.py @@ -17,7 +17,8 @@ from cctbx import sgtbx from dials.array_family import flex from dials.util import show_mail_handle_errors -from dials.util.options import ArgumentParser, reflections_and_experiments_from_files +from dials.util.options import (ArgumentParser, + reflections_and_experiments_from_files) from laue_dials.algorithms.integration import SegmentedImage diff --git a/src/laue_dials/command_line/optimize_indexing.py b/src/laue_dials/command_line/optimize_indexing.py index bf7cdf9..6e2fc96 100644 --- a/src/laue_dials/command_line/optimize_indexing.py +++ b/src/laue_dials/command_line/optimize_indexing.py @@ -13,7 +13,8 @@ import numpy as np from dials.array_family.flex import reflection_table from dials.util import show_mail_handle_errors -from dials.util.options import ArgumentParser, reflections_and_experiments_from_files +from dials.util.options import (ArgumentParser, + reflections_and_experiments_from_files) from dxtbx.model import ExperimentList logger = logging.getLogger("laue-dials.command_line.optimize_indexing") diff --git a/src/laue_dials/command_line/plot_wavelengths.py b/src/laue_dials/command_line/plot_wavelengths.py index 49fac8a..fa3be19 100644 --- a/src/laue_dials/command_line/plot_wavelengths.py +++ b/src/laue_dials/command_line/plot_wavelengths.py @@ -8,7 +8,8 @@ import libtbx.phil from dials.util import show_mail_handle_errors -from dials.util.options import ArgumentParser, reflections_and_experiments_from_files +from dials.util.options import (ArgumentParser, + reflections_and_experiments_from_files) from matplotlib import pyplot as plt logger = logging.getLogger("laue-dials.command_line.plot_wavelengths") diff --git a/src/laue_dials/command_line/predict.py b/src/laue_dials/command_line/predict.py index e65c511..a8e132f 100644 --- a/src/laue_dials/command_line/predict.py +++ b/src/laue_dials/command_line/predict.py @@ -16,7 +16,8 @@ from dials.array_family import flex from dials.array_family.flex import reflection_table from dials.util import show_mail_handle_errors -from dials.util.options import ArgumentParser, reflections_and_experiments_from_files +from dials.util.options import (ArgumentParser, + reflections_and_experiments_from_files) from dxtbx.model import ExperimentList from laue_dials.algorithms.outliers import gen_kde diff --git a/src/laue_dials/command_line/refine.py b/src/laue_dials/command_line/refine.py index cae01bf..d1a5f5f 100644 --- a/src/laue_dials/command_line/refine.py +++ b/src/laue_dials/command_line/refine.py @@ -19,11 +19,8 @@ from dxtbx.model import ExperimentList from dxtbx.model.experiment_list import ExperimentListFactory -from laue_dials.algorithms.laue import ( - gen_beam_models, - remove_beam_models, - store_wavelengths, -) +from laue_dials.algorithms.laue import (gen_beam_models, remove_beam_models, + store_wavelengths) logger = logging.getLogger("laue-dials.command_line.refine") diff --git a/src/laue_dials/command_line/sequence_to_stills.py b/src/laue_dials/command_line/sequence_to_stills.py index 34c090a..cbce992 100644 --- a/src/laue_dials/command_line/sequence_to_stills.py +++ b/src/laue_dials/command_line/sequence_to_stills.py @@ -14,7 +14,8 @@ from dials.array_family import flex from dials.array_family.flex import reflection_table from dials.util import show_mail_handle_errors -from dials.util.options import ArgumentParser, reflections_and_experiments_from_files +from dials.util.options import (ArgumentParser, + reflections_and_experiments_from_files) from dxtbx.model import MosaicCrystalSauter2014 from dxtbx.model.experiment_list import Experiment, ExperimentList from libtbx.phil import parse