@@ -24,34 +24,32 @@ class MatplotlibParameterChecker(LibraryHandler):
24
24
# Define required parameters for specific matplotlib classes and methods
25
25
REQUIRED_PARAMS = {
26
26
# 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
37
36
# 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
43
41
# 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
47
44
# 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
49
46
}
50
47
51
48
@only_required_for_messages ("matplotlib-parameter" )
52
49
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
55
53
56
54
method_name = self ._get_full_method_name (node )
57
55
if method_name in self .REQUIRED_PARAMS :
0 commit comments