Skip to content

Commit

Permalink
Use context manager to open file
Browse files Browse the repository at this point in the history
  • Loading branch information
larrybradley committed Aug 8, 2024
1 parent fbda459 commit a532962
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
# needs_sphinx = '3.0'

# Extend astropy intersphinx_mapping with packages we use here
# intersphinx_mapping['skimage'] = ('https://scikit-image.org/docs/stable/', None) noqa: F405
# intersphinx_mapping.update( # nosq: F405
# {'skimage': = ('https://scikit-image.org/docs/stable/', None)})

# Exclude astropy intersphinx_mapping for unused packages
del intersphinx_mapping['h5py'] # noqa: F405
Expand Down Expand Up @@ -164,12 +165,13 @@
# Uncomment the following lines to enable the exceptions:
nitpick_filename = 'nitpick-exceptions.txt'
if os.path.isfile(nitpick_filename):
for line in open(nitpick_filename):
if line.strip() == '' or line.startswith('#'):
continue
dtype, target = line.split(None, 1)
target = target.strip()
nitpick_ignore.append((dtype, target))
with open(nitpick_filename) as fh:
for line in fh:
if line.strip() == '' or line.startswith('#'):
continue
dtype, target = line.split(None, 1)
target = target.strip()
nitpick_ignore.append((dtype, target))

# -- Options for linkcheck output ---------------------------------------------
linkcheck_retry = 5
Expand Down

0 comments on commit a532962

Please sign in to comment.