@@ -24,34 +24,32 @@ class MatplotlibParameterChecker(LibraryHandler):
2424 # Define required parameters for specific matplotlib classes and methods
2525 REQUIRED_PARAMS = {
2626 # Plotting Functions
27- 'plot' : ['x' , 'y' ], # x and y data points are required for basic line plots
28- 'scatter' : ['x' , 'y' ], # x and y data points are required for scatter plots
29- 'bar' : ['x' , 'height' ], # x positions and heights are required for bar plots
30- 'hist' : ['x' ], # Data points (x) are required for histogram plots
31- 'pie' : ['x' ], # x data is required for pie chart slices
32- 'imshow' : ['X' ], # Input array (X) is required for displaying images
33- 'contour' : ['X' , 'Y' , 'Z' ], # X, Y, and Z data points are required for contour plots
34- 'contourf' : ['X' , 'Y' , 'Z' ], # X, Y, and Z data points for filled contour plots
35- 'pcolormesh' : ['X' , 'Y' , 'C' ], # X, Y grid and C color values are required for pseudo color plot
36-
27+ "plot" : ["x" , "y" ], # x and y data points are required for basic line plots
28+ "scatter" : ["x" , "y" ], # x and y data points are required for scatter plots
29+ "bar" : ["x" , "height" ], # x positions and heights are required for bar plots
30+ "hist" : ["x" ], # Data points (x) are required for histogram plots
31+ "pie" : ["x" ], # x data is required for pie chart slices
32+ "imshow" : ["X" ], # Input array (X) is required for displaying images
33+ "contour" : ["X" , "Y" , "Z" ], # X, Y, and Z data points are required for contour plots
34+ "contourf" : ["X" , "Y" , "Z" ], # X, Y, and Z data points for filled contour plots
35+ "pcolormesh" : ["X" , "Y" , "C" ], # X, Y grid and C color values are required for pseudo color plot
3736 # Axes Functions
38- 'set_xlabel' : ['xlabel' ], # xlabel is required for setting the x-axis label
39- 'set_ylabel' : ['ylabel' ], # ylabel is required for setting the y-axis label
40- 'set_xlim' : ['left' , 'right' ], # Left and right bounds for x-axis limit
41- 'set_ylim' : ['bottom' , 'top' ], # Bottom and top bounds for y-axis limit
42-
37+ "set_xlabel" : ["xlabel" ], # xlabel is required for setting the x-axis label
38+ "set_ylabel" : ["ylabel" ], # ylabel is required for setting the y-axis label
39+ "set_xlim" : ["left" , "right" ], # Left and right bounds for x-axis limit
40+ "set_ylim" : ["bottom" , "top" ], # Bottom and top bounds for y-axis limit
4341 # Figures and Subplots
44- 'subplots' : ['nrows' , 'ncols' ], # Number of rows and columns are required for creating a subplot grid
45- 'subplot' : ['nrows' , 'ncols' , 'index' ], # Number of rows, columns, and index for specific subplot
46-
42+ "subplots" : ["nrows" , "ncols" ], # Number of rows and columns are required for creating a subplot grid
43+ "subplot" : ["nrows" , "ncols" , "index" ], # Number of rows, columns, and index for specific subplot
4744 # Miscellaneous Functions
48- ' savefig' : [' fname' ], # Filename or file object is required to save a figure
45+ " savefig" : [" fname" ], # Filename or file object is required to save a figure
4946 }
5047
5148 @only_required_for_messages ("matplotlib-parameter" )
5249 def visit_call (self , node : nodes .Call ) -> None :
53- if not self .is_library_imported ('matplotlib' ) and self .is_library_version_valid (lib_version = ):
54- return
50+ # TODO Update
51+ # if not self.is_library_imported('matplotlib') and self.is_library_version_valid(lib_version=):
52+ # return
5553
5654 method_name = self ._get_full_method_name (node )
5755 if method_name in self .REQUIRED_PARAMS :
0 commit comments