Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Tests & Includes #211

Merged
merged 1 commit into from
Oct 20, 2023
Merged

Clean Tests & Includes #211

merged 1 commit into from
Oct 20, 2023

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Oct 19, 2023

Fix issues seen with pyflakes and ruff #208.

Issues seen with `pyflakes` and `ruff`.
@ax3l ax3l added the enhancement New feature or request label Oct 19, 2023
@@ -87,8 +87,10 @@
) # type: numpy.ndarray

# host-to-device copy
x_numba = cuda.to_device(x) # type: numba.cuda.cudadrv.devicearray.DeviceNDArray
# x_cupy = cupy.asarray(x_numba) # type: cupy.ndarray
x_numba = cuda.to_device(x) # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable x_numba is not used.
@@ -6,7 +6,7 @@


def test_basefab():
bf = amr.BaseFab_Real()
bf = amr.BaseFab_Real() # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable bf is not used.
@@ -4,11 +4,11 @@


def test_farraybox():
fab = amr.FArrayBox()
fab = amr.FArrayBox() # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable fab is not used.


def test_farraybox_io():
fab = amr.FArrayBox()
fab = amr.FArrayBox() # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable fab is not used.
@@ -115,7 +115,7 @@
is_periodic = [0, 0, 1]
gm = Gm(box, real_box, coord, is_periodic)

pdcity = gm.periodicity()
pdcity = gm.periodicity() # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable pdcity is not used.
@@ -175,7 +175,7 @@

# assign 3: loop through boxes and launch kernels
for mfi in mfab_device:
bx = mfi.tilebox().grow(ngv)
bx = mfi.tilebox().grow(ngv) # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable bx is not used.
@@ -268,7 +268,7 @@
x[...] = 7.0

for mfi in mfab_device:
bx = mfi.tilebox().grow(ngv)
bx = mfi.tilebox().grow(ngv) # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable bx is not used.
@@ -306,7 +306,7 @@
amr.Config.gpu_backend != "CUDA", reason="Requires AMReX_GPU_BACKEND=CUDA"
)
def test_mfab_ops_cuda_cuml(make_mfab_device):
mfab_device = make_mfab_device()
mfab_device = make_mfab_device() # noqa

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable mfab_device is not used.
@@ -208,7 +208,7 @@
# assign 3
with cupyx.profiler.time_range("assign 3 [()]", color_id=0):
for mfi in mfab_device:
bx = mfi.tilebox().grow(ngv)
bx = mfi.tilebox().grow(ngv) # noqa

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning test

This assignment to 'bx' is unnecessary as it is
redefined
before this value is used.
This assignment to 'bx' is unnecessary as it is
redefined
before this value is used.
@@ -243,7 +243,7 @@
return mm

for mfi in mfab_device:
bx = mfi.tilebox().grow(ngv)
bx = mfi.tilebox().grow(ngv) # noqa

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning test

This assignment to 'bx' is unnecessary as it is
redefined
before this value is used.
@ax3l ax3l merged commit 198cbb3 into AMReX-Codes:development Oct 20, 2023
25 checks passed
@ax3l ax3l deleted the clean-pyflakes branch October 20, 2023 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant