Apply suggestions from code review

Including suggestions from @paulromano.

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Patrick Shriwise 2020-04-26 20:30:06 -05:00 committed by GitHub
parent f28b197cd3
commit 114ebef711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -685,7 +685,6 @@ class UnstructuredMesh(MeshBase):
Parameters
----------
filename : str
Name of the VTK file to write.
datasets : dict
@ -757,7 +756,7 @@ class UnstructuredMesh(MeshBase):
poly_data.GetPointData().AddArray(array)
# set filename
if filename[-4:] != ".vtk":
if not filename.endswith(".vtk"):
filename += ".vtk"
writer = vtk.vtkGenericDataObjectWriter()