Skip to content

Commit

Permalink
Manual fixes for lint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ndevenish committed Jun 6, 2024
1 parent 997d8aa commit 29a140d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/dxtbx/format/FormatXTC.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from itertools import groupby

import numpy as np

import serialtbx.detector.xtc
import serialtbx.util

from libtbx.phil import parse
from scitbx.array_family import flex

Expand Down Expand Up @@ -174,7 +174,7 @@ def _load_hit_indices(self):
assert self.params.mode == "idx"
hits = np.loadtxt(self.params.hits_file, int)
hits = list(map(tuple, hits))
key = lambda x: x[0]
key = lambda x: x[0] # noqa: E731
gb = groupby(sorted(hits, key=key), key=key)
# dictionary where key is run number, and vals are indices of hits
self._hit_inds = {r: [ind for _, ind in group] for r, group in gb}
Expand Down
2 changes: 1 addition & 1 deletion src/dxtbx/format/nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Iterable, Union

import h5py
import hdf5plugin # noqa; F401
import hdf5plugin # noqa: F401
import numpy

import cctbx.uctbx
Expand Down
4 changes: 2 additions & 2 deletions src/dxtbx/imageset.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from typing import Iterable

import natsort

import boost_adaptbx.boost.python
Expand Down Expand Up @@ -31,8 +33,6 @@

ext = boost_adaptbx.boost.python.import_ext("dxtbx_ext")

from typing import Iterable

__all__ = (
"ExternalLookup",
"ExternalLookupItemBool",
Expand Down
2 changes: 1 addition & 1 deletion src/dxtbx/util/dlsnxs2cbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path

import h5py
import hdf5plugin # noqa; F401
import hdf5plugin # noqa: F401
import numpy as np
import nxmx
import pint
Expand Down
3 changes: 1 addition & 2 deletions tests/nexus/test_nxmx_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
from libtbx.test_utils import approx_equal

from dxtbx.format.nexus import h5str
from dxtbx.format.nxmx_writer import NXmxWriter, phil_scope
from dxtbx.model.experiment_list import ExperimentListFactory

pytest.importorskip("dials")

from dxtbx.format.nxmx_writer import NXmxWriter, phil_scope


def test_writer_jf16M(dials_data, tmpdir):
h5path = (
Expand Down

0 comments on commit 29a140d

Please sign in to comment.