Skip to content

Commit

Permalink
refactor: resolve ruff check F821 for undefined names (#2374)
Browse files Browse the repository at this point in the history
This is a minor refactor to resolve F821 for undefined name.

As with other checks, "flopy/mf6/**/*.py" is ignored (which currently has several F821 issues).
  • Loading branch information
mwtoews authored Nov 18, 2024
1 parent 7fb55b1 commit 373b82d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .docs/Notebooks/vtk_pathlines_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def fill_zone_1():
# Show the GIF.

# +
from IPython.core.display import Image
from IPython.display import Image, display

display(Image(data=open(gif_path, "rb").read(), format="gif"))
# -
Expand Down
1 change: 1 addition & 0 deletions autotest/test_plot_particle_tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from matplotlib.collections import LineCollection, PathCollection
from modflow_devtools.markers import requires_exe

import flopy
from flopy.modflow import Modflow
from flopy.modpath import Modpath6, Modpath6Bas
from flopy.plot import PlotCrossSection, PlotMapView
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,12 @@ ignore = [
"F403", # unable to detect undefined names (star imports)
"F524", # `.format` missing argument(s) for placeholder(s)
"F811", # Redefinition of unused variable
"F821", # undefined name TODO FIXME
"F841", # local variable assigned but never used
]

[tool.ruff.lint.per-file-ignores]
".docs/**/*.py" = ["E501"]
"flopy/mf6/**/*.py" = ["E501", "ISC001"]
"flopy/mf6/**/*.py" = ["E501", "F821", "ISC001"]

[tool.codespell]
skip = "cliff.toml,./examples/data/*"
Expand Down

0 comments on commit 373b82d

Please sign in to comment.