From ba54d03cc59affd3c9fec7019920944d81ad0342 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Fri, 15 Nov 2024 14:24:37 +0100 Subject: [PATCH] Fix SyntaxWarnings --- setup.py | 4 ++-- tvtk/wrapper_gen.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 2b81501c..6f978b4c 100644 --- a/setup.py +++ b/setup.py @@ -130,8 +130,8 @@ def example_files(self): mlab_ref_dir = join(DEFAULT_INPUT_DIR, 'mayavi', 'auto') source_path = join('examples', 'mayavi') - sources = '(\.py)|(\.rst)$' - excluded_dirs = '^\.' + sources = r'(\.py)|(\.rst)$' + excluded_dirs = r'^\.' target_path = mlab_ref_dir target_time = self.latest_modified(target_path, ignore_dirs=excluded_dirs)[0] diff --git a/tvtk/wrapper_gen.py b/tvtk/wrapper_gen.py index 95b9810e..1cf9f8b2 100644 --- a/tvtk/wrapper_gen.py +++ b/tvtk/wrapper_gen.py @@ -1591,22 +1591,22 @@ def _write_trait_with_range(self, klass, out, vtk_attr_name): # the code for this trait, # i.e. getattr(self, name_of_method)(...) special_traits = { - '[a-zA-Z0-9]+\.Output$': ( + r'[a-zA-Z0-9]+\.Output$': ( False, False, '_write_any_output'), - '[a-zA-Z0-9]+\.Source$': ( + r'[a-zA-Z0-9]+\.Source$': ( False, False, '_write_any_source'), - '[a-zA-Z0-9]+\.ScalarType$': ( + r'[a-zA-Z0-9]+\.ScalarType$': ( False, False, '_write_any_scalar_type'), # In VTK > 4.5, Set/GetInput have multiple signatures - '[a-zA-Z0-9]+\.Input$': ( + r'[a-zA-Z0-9]+\.Input$': ( False, False, '_write_any_input'), - '[a-zA-Z0-9]+\.InputConnection$': ( + r'[a-zA-Z0-9]+\.InputConnection$': ( False, False, '_write_any_input_connection'), - '[a-zA-Z0-9\.]+FileName$': ( + r'[a-zA-Z0-9\.]+FileName$': ( True, False, '_write_any_something_file_name'), - '[a-zA-Z0-9\.]+FilePrefix$': ( + r'[a-zA-Z0-9\.]+FilePrefix$': ( True, False, '_write_any_something_file_prefix'), 'vtkImageReader2.HeaderSize$': ( True, False, '_write_image_reader2_header_size'),