File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 11import  re 
2+ import  typing 
23from  pathlib  import  Path 
34
45import  matplotlib .pyplot  as  plt 
56from  matplotlib .colors  import  Colormap 
7+ from  matplotlib .typing  import  RcKeyType , RcGroupKeyType 
68
79
810def  test_cm_stub_matches_runtime_colormaps ():
@@ -30,3 +32,20 @@ def test_cm_stub_matches_runtime_colormaps():
3032    )
3133
3234    assert  runtime_cmaps  ==  stubbed_cmaps 
35+ 
36+ 
37+ def  test_rcparam_stubs ():
38+     runtime_rc_keys  =  {
39+         name  for  name  in  plt .rcParamsDefault .keys ()
40+         if  not  name .startswith ('_' )
41+     }
42+ 
43+     assert  {* typing .get_args (RcKeyType )} ==  runtime_rc_keys 
44+ 
45+     runtime_rc_group_keys  =  set ()
46+     for  name  in  runtime_rc_keys :
47+         groups  =  name .split ('.' )
48+         for  i  in  range (1 , len (groups )):
49+             runtime_rc_group_keys .add ('.' .join (groups [:i ]))
50+ 
51+     assert  {* typing .get_args (RcGroupKeyType )} ==  runtime_rc_group_keys 
Original file line number Diff line number Diff line change 217217    "axes.ymargin" ,
218218    "axes.zmargin" ,
219219    "axes3d.automargin" ,
220+     "axes3d.depthshade" ,
221+     "axes3d.depthshade_minalpha" ,
220222    "axes3d.grid" ,
221223    "axes3d.mouserotationstyle" ,
222224    "axes3d.trackballborder" ,
304306    "figure.titlesize" ,
305307    "figure.titleweight" ,
306308    "font.cursive" ,
309+     "font.enable_last_resort" ,
307310    "font.family" ,
308311    "font.fantasy" ,
309312    "font.monospace" ,
318321    "grid.color" ,
319322    "grid.linestyle" ,
320323    "grid.linewidth" ,
324+     "grid.major.alpha" ,
325+     "grid.major.color" ,
326+     "grid.major.linestyle" ,
327+     "grid.major.linewidth" ,
328+     "grid.minor.alpha" ,
329+     "grid.minor.color" ,
330+     "grid.minor.linestyle" ,
331+     "grid.minor.linewidth" ,
321332    "hatch.color" ,
322333    "hatch.linewidth" ,
323334    "hist.bins" ,
492503    "ytick.minor.size" ,
493504    "ytick.minor.visible" ,
494505    "ytick.minor.width" ,
495-     "ytick.right" 
506+     "ytick.right" , 
496507]
497508
498509RcGroupKeyType : TypeAlias  =  Literal [
524535    "figure.subplot" ,
525536    "font" ,
526537    "grid" ,
538+     "grid.major" ,
539+     "grid.minor" ,
527540    "hatch" ,
528541    "hist" ,
529542    "image" ,
546559    "scatter" ,
547560    "svg" ,
548561    "text" ,
562+     "text.latex" ,
549563    "tk" ,
550564    "webagg" ,
551565    "xaxis" ,
555569    "yaxis" ,
556570    "ytick" ,
557571    "ytick.major" ,
558-     "ytick.minor" 
572+     "ytick.minor" , 
559573]
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments