Skip to content

Commit 18a947c

Browse files
committed
flake fixes
Former-commit-id: e59bf62
1 parent 272a3f5 commit 18a947c

12 files changed

+15
-20
lines changed

test/gettestdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
import argparse
5-
from os.path import join, exists
5+
from os.path import exists
66
from os import makedirs
77

88
from py4DSTEM import _TESTPATH as testpath

test/test_braggvectors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def setup_class(cls):
5252
# tests
5353

5454
def test_BraggVectors_import(self):
55-
from py4DSTEM.braggvectors import BraggVectors
55+
from py4DSTEM.braggvectors import BraggVectors # noqa: F401
5656

5757
pass
5858

@@ -67,7 +67,7 @@ def test_disk_detection_selected_positions(self):
6767
68,
6868
)
6969

70-
disks_selected = self.datacube.find_Bragg_disks(
70+
disks_selected = self.datacube.find_Bragg_disks( # noqa: F841
7171
data=(rxs, rys),
7272
template=self.probe.kernel,
7373
**self.detect_params,

test/test_crystal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import numpy as np
21

32
# from py4DSTEM.classes import (
43
# Crystal

test/test_native_io/test_calibration_io.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import py4DSTEM
2-
import numpy as np
3-
from os.path import join
1+
#import py4DSTEM
2+
#import numpy as np
3+
#from os.path import join
44

55
# set filepath
66
# path = join(py4DSTEM._TESTPATH, "filename")

test/test_native_io/test_realslice_read.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010

1111

1212
def test_read_realslice():
13-
realslice = py4DSTEM.read(filepath, datapath="4DSTEM/Fit Data")
13+
realslice = py4DSTEM.read(filepath, datapath="4DSTEM/Fit Data") # noqa: F841
14+

test/test_native_io/test_single_object_io.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import numpy as np
2-
from os.path import join, exists
3-
from os import remove
2+
from os.path import join
43
from numpy import array_equal
54

65
import py4DSTEM
76
from py4DSTEM import save, read
8-
import emdfile as emd
97

108
from py4DSTEM import (
11-
Calibration,
129
DiffractionSlice,
1310
RealSlice,
1411
QPoints,

test/test_native_io/test_v0_14.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _make_v14_test_file():
3838
alpha, qx0, qy0 = py4DSTEM.process.probe.get_probe_size(probe.probe)
3939

4040
# prepare the probe kernel
41-
kern = probe.get_kernel(mode="sigmoid", origin=(qx0, qy0), radii=(alpha, 2 * alpha))
41+
kern = probe.get_kernel(mode="sigmoid", origin=(qx0, qy0), radii=(alpha, 2 * alpha)) # noqa: F841
4242

4343
# Set disk detection parameters
4444
detect_params = {
@@ -54,7 +54,7 @@ def _make_v14_test_file():
5454
}
5555

5656
# compute
57-
braggpeaks = datacube.find_Bragg_disks(
57+
braggpeaks = datacube.find_Bragg_disks( # noqa: F841
5858
template=probe.kernel,
5959
**detect_params,
6060
)

test/test_probe.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import py4DSTEM
22
from py4DSTEM import Probe
33
import numpy as np
4-
from os.path import join
54

65
# set filepath
76
path = py4DSTEM._TESTPATH + "/small_datacube.dm4"

test/test_strain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import py4DSTEM
22
from py4DSTEM import StrainMap
33
from os.path import join
4-
from numpy import zeros
54

65

76
# set filepath

test/test_workflow/test_basics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_show(self):
3131
# virtual diffraction and imaging
3232

3333
def test_virt_diffraction(self):
34-
dp_mean = self.datacube.get_dp_mean()
34+
dp_mean = self.datacube.get_dp_mean() # noqa: F841
3535
self.datacube.get_dp_max()
3636

3737
def test_virt_imaging_bf(self):

0 commit comments

Comments
 (0)