From e79ee397ed3c5a599fc7d871ee5dbc3510d8cd5d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:01:15 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#207) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 23.11.0 → 24.2.0](https://github.com/psf/black/compare/23.11.0...24.2.0) - [github.com/pycqa/isort: 5.13.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.13.0...5.13.2) - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0) - [github.com/asottile/pyupgrade: v3.15.0 → v3.15.1](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.15.1) - [github.com/python-jsonschema/check-jsonschema: 0.27.3 → 0.28.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.27.3...0.28.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tetsuo Koyama --- .pre-commit-config.yaml | 10 +++++----- doc/source/make_external_gallery.py | 1 + tutorial/00_intro/a_basic.py | 1 + tutorial/00_jupyter/jupyter.py | 1 + tutorial/02_mesh/a_lesson_mesh.py | 1 + tutorial/02_mesh/exercises/e_read-file.py | 1 + tutorial/02_mesh/solutions/e_read-file.py | 1 + tutorial/03_figures/a_lesson_figures.py | 1 + tutorial/03_figures/b_shading.py | 1 + tutorial/03_figures/bonus/e_labels.py | 1 + tutorial/03_figures/c_geological-map.py | 1 + tutorial/03_figures/exercises/a_display_options.py | 1 + tutorial/03_figures/exercises/b_lighting_mesh.py | 1 + tutorial/03_figures/exercises/c_edl.py | 1 + tutorial/03_figures/solutions/a_display_options.py | 1 + tutorial/03_figures/solutions/b_lighting_mesh.py | 1 + tutorial/03_figures/solutions/c_edl.py | 1 + tutorial/04_filters/exercises/b_clipping.py | 1 + tutorial/04_filters/exercises/d_contouring.py | 1 + tutorial/04_filters/exercises/e_glyphs.py | 1 + tutorial/04_filters/solutions/b_clipping.py | 1 + tutorial/04_filters/solutions/d_contouring.py | 1 + tutorial/04_filters/solutions/e_glyphs.py | 1 + tutorial/06_vtk/b_create_vtk.py | 1 + tutorial/08_widgets/b_checkbox-widget.py | 1 + tutorial/08_widgets/d_multi-slider-widget.py | 1 + tutorial/08_widgets/e_plane-widget.py | 1 + tutorial/08_widgets/f_slider-bar-widget.py | 1 + tutorial/08_widgets/g_sphere-widget.py | 1 + tutorial/08_widgets/h_spline-widget.py | 1 + tutorial/09_trame/a_trame_simple.py | 1 + tutorial/09_trame/b_trame_actor_color.py | 1 + tutorial/09_trame/d_trame_scalar_range.py | 1 + tutorial/09_trame/f_trame_open_file.py | 1 + 34 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b6701ad1..ac3e3ed2c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ repos: - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 24.2.0 hooks: - id: black - repo: https://github.com/pycqa/isort - rev: 5.13.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: [ @@ -29,7 +29,7 @@ repos: ] - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.1 hooks: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] @@ -48,6 +48,6 @@ repos: - id: end-of-file-fixer - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.3 + rev: 0.28.0 hooks: - id: check-github-workflows diff --git a/doc/source/make_external_gallery.py b/doc/source/make_external_gallery.py index 0e6830ff7..72f3699d9 100644 --- a/doc/source/make_external_gallery.py +++ b/doc/source/make_external_gallery.py @@ -1,4 +1,5 @@ """A helper script to generate the external examples gallery.""" + from io import StringIO import os from pathlib import Path diff --git a/tutorial/00_intro/a_basic.py b/tutorial/00_intro/a_basic.py index 90b393ea9..1ca2223f9 100644 --- a/tutorial/00_intro/a_basic.py +++ b/tutorial/00_intro/a_basic.py @@ -6,6 +6,7 @@ This is the "Hello, world!" of PyVista. """ + import pyvista as pv ############################################################################### diff --git a/tutorial/00_jupyter/jupyter.py b/tutorial/00_jupyter/jupyter.py index cbf098c80..359912b24 100644 --- a/tutorial/00_jupyter/jupyter.py +++ b/tutorial/00_jupyter/jupyter.py @@ -4,6 +4,7 @@ Become familiar with PyVista Jupyter backend. """ + import pyvista as pv # Set/enable the backed diff --git a/tutorial/02_mesh/a_lesson_mesh.py b/tutorial/02_mesh/a_lesson_mesh.py index 8070c5994..9ebe31571 100644 --- a/tutorial/02_mesh/a_lesson_mesh.py +++ b/tutorial/02_mesh/a_lesson_mesh.py @@ -6,6 +6,7 @@ to try out! """ + # sphinx_gallery_thumbnail_number = 2 import numpy as np import pyvista as pv diff --git a/tutorial/02_mesh/exercises/e_read-file.py b/tutorial/02_mesh/exercises/e_read-file.py index aeac78e69..136eef0ee 100644 --- a/tutorial/02_mesh/exercises/e_read-file.py +++ b/tutorial/02_mesh/exercises/e_read-file.py @@ -7,6 +7,7 @@ Read a dataset from a known file type. """ + ############################################################################### # We try to make loading a mesh as easy as possible - if your data is in one # of the many supported file formats, simply use :func:`pyvista.read` to diff --git a/tutorial/02_mesh/solutions/e_read-file.py b/tutorial/02_mesh/solutions/e_read-file.py index 7c875c088..b883eac73 100644 --- a/tutorial/02_mesh/solutions/e_read-file.py +++ b/tutorial/02_mesh/solutions/e_read-file.py @@ -7,6 +7,7 @@ Read a dataset from a known file type. """ + ############################################################################### # We try to make loading a mesh as easy as possible - if your data is in one # of the many supported file formats, simply use :func:`pyvista.read` to diff --git a/tutorial/03_figures/a_lesson_figures.py b/tutorial/03_figures/a_lesson_figures.py index 563d2112d..df758b2ad 100644 --- a/tutorial/03_figures/a_lesson_figures.py +++ b/tutorial/03_figures/a_lesson_figures.py @@ -3,6 +3,7 @@ ~~~~~~~~~~~~~~~ """ + import pyvista as pv from pyvista import examples diff --git a/tutorial/03_figures/b_shading.py b/tutorial/03_figures/b_shading.py index 3c1d878c6..c1110e63d 100644 --- a/tutorial/03_figures/b_shading.py +++ b/tutorial/03_figures/b_shading.py @@ -6,6 +6,7 @@ Comparison of default, flat shading vs. smooth shading. """ + # sphinx_gallery_thumbnail_number = 4 import pyvista as pv from pyvista import examples diff --git a/tutorial/03_figures/bonus/e_labels.py b/tutorial/03_figures/bonus/e_labels.py index a0f390f67..645e97633 100644 --- a/tutorial/03_figures/bonus/e_labels.py +++ b/tutorial/03_figures/bonus/e_labels.py @@ -4,6 +4,7 @@ Use string arrays in a point set to label points """ + # sphinx_gallery_thumbnail_number = 3 import numpy as np import pyvista as pv diff --git a/tutorial/03_figures/c_geological-map.py b/tutorial/03_figures/c_geological-map.py index f607a2c08..534c934cd 100644 --- a/tutorial/03_figures/c_geological-map.py +++ b/tutorial/03_figures/c_geological-map.py @@ -10,6 +10,7 @@ Originally posted here: https://github.com/pyvista/pyvista-support/issues/14 """ + # sphinx_gallery_thumbnail_number = 2 import os import tempfile diff --git a/tutorial/03_figures/exercises/a_display_options.py b/tutorial/03_figures/exercises/a_display_options.py index 94bd0f309..0ed64d101 100644 --- a/tutorial/03_figures/exercises/a_display_options.py +++ b/tutorial/03_figures/exercises/a_display_options.py @@ -4,6 +4,7 @@ Take a look at the different display options offered by the ``add_mesh`` method. """ + import pyvista as pv from pyvista import examples diff --git a/tutorial/03_figures/exercises/b_lighting_mesh.py b/tutorial/03_figures/exercises/b_lighting_mesh.py index a64f7a06c..432466b6f 100644 --- a/tutorial/03_figures/exercises/b_lighting_mesh.py +++ b/tutorial/03_figures/exercises/b_lighting_mesh.py @@ -12,6 +12,7 @@ See the ``add_mesh`` docs for lighting options: https://docs.pyvista.org/api/plotting/_autosummary/pyvista.Plotter.add_mesh.html """ + # sphinx_gallery_thumbnail_number = 4 import pyvista as pv from pyvista import examples diff --git a/tutorial/03_figures/exercises/c_edl.py b/tutorial/03_figures/exercises/c_edl.py index 2c75171d8..f410ef069 100644 --- a/tutorial/03_figures/exercises/c_edl.py +++ b/tutorial/03_figures/exercises/c_edl.py @@ -9,6 +9,7 @@ .. _this blog post: https://blog.kitware.com/eye-dome-lighting-a-non-photorealistic-shading-technique/ """ + ############################################################################### # sphinx_gallery_thumbnail_number = 1 diff --git a/tutorial/03_figures/solutions/a_display_options.py b/tutorial/03_figures/solutions/a_display_options.py index 3152c0238..33fbac50c 100644 --- a/tutorial/03_figures/solutions/a_display_options.py +++ b/tutorial/03_figures/solutions/a_display_options.py @@ -4,6 +4,7 @@ Take a look at the different display options offered by the ``add_mesh`` method. """ + import pyvista as pv from pyvista import examples diff --git a/tutorial/03_figures/solutions/b_lighting_mesh.py b/tutorial/03_figures/solutions/b_lighting_mesh.py index 4e0297173..ae52763b4 100644 --- a/tutorial/03_figures/solutions/b_lighting_mesh.py +++ b/tutorial/03_figures/solutions/b_lighting_mesh.py @@ -14,6 +14,7 @@ See the ``add_mesh`` docs for lighting options: https://docs.pyvista.org/api/plotting/_autosummary/pyvista.Plotter.add_mesh.html """ + # sphinx_gallery_thumbnail_number = 4 import pyvista as pv from pyvista import examples diff --git a/tutorial/03_figures/solutions/c_edl.py b/tutorial/03_figures/solutions/c_edl.py index d0947bbcb..68f409254 100644 --- a/tutorial/03_figures/solutions/c_edl.py +++ b/tutorial/03_figures/solutions/c_edl.py @@ -11,6 +11,7 @@ .. _this blog post: https://blog.kitware.com/eye-dome-lighting-a-non-photorealistic-shading-technique/ """ + ############################################################################### # sphinx_gallery_thumbnail_number = 1 diff --git a/tutorial/04_filters/exercises/b_clipping.py b/tutorial/04_filters/exercises/b_clipping.py index 9bde24315..82853b727 100644 --- a/tutorial/04_filters/exercises/b_clipping.py +++ b/tutorial/04_filters/exercises/b_clipping.py @@ -4,6 +4,7 @@ Clip/cut any dataset using using planes or boxes. """ + # sphinx_gallery_thumbnail_number = 2 import pyvista as pv from pyvista import examples diff --git a/tutorial/04_filters/exercises/d_contouring.py b/tutorial/04_filters/exercises/d_contouring.py index 399796406..dedc90f85 100644 --- a/tutorial/04_filters/exercises/d_contouring.py +++ b/tutorial/04_filters/exercises/d_contouring.py @@ -7,6 +7,7 @@ 3D meshes can have 2D iso-surfaces of a scalar field extracted and 2D surface meshes can have 1D iso-lines of a scalar field extracted. """ + import pyvista as pv from pyvista import examples diff --git a/tutorial/04_filters/exercises/e_glyphs.py b/tutorial/04_filters/exercises/e_glyphs.py index 0e0f2b352..fa0b2f2d1 100644 --- a/tutorial/04_filters/exercises/e_glyphs.py +++ b/tutorial/04_filters/exercises/e_glyphs.py @@ -4,6 +4,7 @@ Use vectors in a dataset to plot and orient glyphs/geometric objects. """ + import numpy as np import pyvista as pv from pyvista import examples diff --git a/tutorial/04_filters/solutions/b_clipping.py b/tutorial/04_filters/solutions/b_clipping.py index 8750aab22..6a7378c59 100644 --- a/tutorial/04_filters/solutions/b_clipping.py +++ b/tutorial/04_filters/solutions/b_clipping.py @@ -6,6 +6,7 @@ Clip/cut any dataset using using planes or boxes. """ + # sphinx_gallery_thumbnail_number = 2 import pyvista as pv from pyvista import examples diff --git a/tutorial/04_filters/solutions/d_contouring.py b/tutorial/04_filters/solutions/d_contouring.py index 53df4293b..ec43c24d9 100644 --- a/tutorial/04_filters/solutions/d_contouring.py +++ b/tutorial/04_filters/solutions/d_contouring.py @@ -9,6 +9,7 @@ 3D meshes can have 2D iso-surfaces of a scalar field extracted and 2D surface meshes can have 1D iso-lines of a scalar field extracted. """ + import numpy as np import pyvista as pv from pyvista import examples diff --git a/tutorial/04_filters/solutions/e_glyphs.py b/tutorial/04_filters/solutions/e_glyphs.py index 59e3dfbf6..f5fc611d2 100644 --- a/tutorial/04_filters/solutions/e_glyphs.py +++ b/tutorial/04_filters/solutions/e_glyphs.py @@ -6,6 +6,7 @@ Use vectors in a dataset to plot and orient glyphs/geometric objects. """ + import numpy as np import pyvista as pv from pyvista import examples diff --git a/tutorial/06_vtk/b_create_vtk.py b/tutorial/06_vtk/b_create_vtk.py index 850d3b10b..2944c20e0 100644 --- a/tutorial/06_vtk/b_create_vtk.py +++ b/tutorial/06_vtk/b_create_vtk.py @@ -4,6 +4,7 @@ This exercise walks through the creation of a few different types of VTK datasets. """ + import numpy as np import pyvista as pv import vtk diff --git a/tutorial/08_widgets/b_checkbox-widget.py b/tutorial/08_widgets/b_checkbox-widget.py index 2540fdaf1..4fa348b39 100644 --- a/tutorial/08_widgets/b_checkbox-widget.py +++ b/tutorial/08_widgets/b_checkbox-widget.py @@ -9,6 +9,7 @@ See :func:`pyvista.Plotter.add_checkbox_button_widget` for more details. """ + # sphinx_gallery_thumbnail_number = 2 import pyvista as pv diff --git a/tutorial/08_widgets/d_multi-slider-widget.py b/tutorial/08_widgets/d_multi-slider-widget.py index fe2825f78..f96852943 100644 --- a/tutorial/08_widgets/d_multi-slider-widget.py +++ b/tutorial/08_widgets/d_multi-slider-widget.py @@ -10,6 +10,7 @@ mesh-generating/altering code. """ + import pyvista as pv diff --git a/tutorial/08_widgets/e_plane-widget.py b/tutorial/08_widgets/e_plane-widget.py index 4e17346ea..93e765d0a 100644 --- a/tutorial/08_widgets/e_plane-widget.py +++ b/tutorial/08_widgets/e_plane-widget.py @@ -13,6 +13,7 @@ Let's use a plane to clip a mesh: """ + # sphinx_gallery_thumbnail_number = 2 import pyvista as pv from pyvista import examples diff --git a/tutorial/08_widgets/f_slider-bar-widget.py b/tutorial/08_widgets/f_slider-bar-widget.py index d9cde1d21..498b2b75d 100644 --- a/tutorial/08_widgets/f_slider-bar-widget.py +++ b/tutorial/08_widgets/f_slider-bar-widget.py @@ -10,6 +10,7 @@ This is one of the most versatile widgets as it can control a value that can be used for just about anything. """ + # sphinx_gallery_thumbnail_number = 1 ############################################################################## diff --git a/tutorial/08_widgets/g_sphere-widget.py b/tutorial/08_widgets/g_sphere-widget.py index fcc140bab..e27eee9f1 100644 --- a/tutorial/08_widgets/g_sphere-widget.py +++ b/tutorial/08_widgets/g_sphere-widget.py @@ -14,6 +14,7 @@ Let's look at a few use cases that all update a surface mesh. """ + # sphinx_gallery_thumbnail_number = 3 ############################################################################## diff --git a/tutorial/08_widgets/h_spline-widget.py b/tutorial/08_widgets/h_spline-widget.py index ae6e13d6e..931cc496f 100644 --- a/tutorial/08_widgets/h_spline-widget.py +++ b/tutorial/08_widgets/h_spline-widget.py @@ -14,6 +14,7 @@ :func:`pyvista.DataSetFilters.slice_along_line` filter named :func:`pyvista.Plotter.add_mesh_slice_spline`. """ + import numpy as np import pyvista as pv diff --git a/tutorial/09_trame/a_trame_simple.py b/tutorial/09_trame/a_trame_simple.py index 525cdb447..a64d5a609 100644 --- a/tutorial/09_trame/a_trame_simple.py +++ b/tutorial/09_trame/a_trame_simple.py @@ -8,6 +8,7 @@ new Trame application with PyVista. """ + import pyvista as pv from pyvista import examples from pyvista.trame.ui import plotter_ui diff --git a/tutorial/09_trame/b_trame_actor_color.py b/tutorial/09_trame/b_trame_actor_color.py index 7da3700ee..fd7d31006 100644 --- a/tutorial/09_trame/b_trame_actor_color.py +++ b/tutorial/09_trame/b_trame_actor_color.py @@ -6,6 +6,7 @@ the actor. """ + import pyvista as pv from pyvista.plotting.colors import hexcolors from pyvista.trame.ui import plotter_ui diff --git a/tutorial/09_trame/d_trame_scalar_range.py b/tutorial/09_trame/d_trame_scalar_range.py index 77c71d955..e282b5cef 100644 --- a/tutorial/09_trame/d_trame_scalar_range.py +++ b/tutorial/09_trame/d_trame_scalar_range.py @@ -4,6 +4,7 @@ Extending our simple example to control the color limits of the mapped scalars. """ + import pyvista as pv from pyvista.trame.ui import plotter_ui from trame.app import get_server diff --git a/tutorial/09_trame/f_trame_open_file.py b/tutorial/09_trame/f_trame_open_file.py index 67ae2f140..93e44e3cd 100644 --- a/tutorial/09_trame/f_trame_open_file.py +++ b/tutorial/09_trame/f_trame_open_file.py @@ -5,6 +5,7 @@ An example of opening a mesh file from the browser and viewing it with PyVista. """ + import tempfile import pyvista as pv