@@ -213,11 +213,14 @@ def _is_writable_dir(p):
213
213
p is a string pointing to a putative writable dir -- return True p
214
214
is such a string, else False
215
215
"""
216
- try : p + '' # test is string like
217
- except TypeError : return False
216
+ try :
217
+ p + '' # test is string like
218
+ except TypeError :
219
+ return False
218
220
try :
219
221
return os .access (p , os .W_OK )
220
- except OSError : return False
222
+ except OSError :
223
+ return False
221
224
222
225
class Verbose :
223
226
"""
@@ -644,7 +647,7 @@ def matplotlib_fname():
644
647
645
648
"""
646
649
647
- oldname = os .path .join ( os .getcwd (), '.matplotlibrc' )
650
+ oldname = os .path .join (os .getcwd (), '.matplotlibrc' )
648
651
if os .path .exists (oldname ):
649
652
print ("""\
650
653
WARNING: Old rc filename ".matplotlibrc" found in working dir
@@ -658,7 +661,7 @@ def matplotlib_fname():
658
661
home = get_home ()
659
662
configdir = get_configdir ()
660
663
if home :
661
- oldname = os .path .join ( home , '.matplotlibrc' )
664
+ oldname = os .path .join (home , '.matplotlibrc' )
662
665
if os .path .exists (oldname ):
663
666
if configdir is not None :
664
667
newname = os .path .join (configdir , 'matplotlibrc' )
@@ -676,8 +679,7 @@ def matplotlib_fname():
676
679
WARNING: Could not rename old rc file "%s": a suitable configuration directory
677
680
could not be found.""" % oldname , file = sys .stderr )
678
681
679
-
680
- fname = os .path .join ( os .getcwd (), 'matplotlibrc' )
682
+ fname = os .path .join (os .getcwd (), 'matplotlibrc' )
681
683
if os .path .exists (fname ): return fname
682
684
683
685
if 'MATPLOTLIBRC' in os .environ :
@@ -689,8 +691,8 @@ def matplotlib_fname():
689
691
690
692
if configdir is not None :
691
693
fname = os .path .join (configdir , 'matplotlibrc' )
692
- if os .path .exists (fname ): return fname
693
-
694
+ if os .path .exists (fname ):
695
+ return fname
694
696
695
697
path = get_data_path () # guaranteed to exist or raise
696
698
fname = os .path .join (path , 'matplotlibrc' )
0 commit comments