Skip to content

Commit

Permalink
Apply Ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenbeam committed Jan 14, 2025
1 parent b3e1bbb commit 4df2dfb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@

# -- Project information

project = 'MetGenC'
copyright = '2024, NSIDC'
author = 'National Snow and Ice Data Center'
project = "MetGenC"
copyright = "2024, NSIDC"
author = "National Snow and Ice Data Center"

release = '0.6'
version = '0.6.0'
release = "0.6"
version = "0.6.0"

# -- General configuration

extensions = [
'sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
"sphinx.ext.duration",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
]

intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}
intersphinx_disabled_domains = ['std']
intersphinx_disabled_domains = ["std"]

templates_path = ['_templates']
templates_path = ["_templates"]

# -- Options for HTML output

html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# -- Options for EPUB output
epub_show_urls = 'footnote'
epub_show_urls = "footnote"
3 changes: 3 additions & 0 deletions src/nsidc/metgen/metgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,15 +668,18 @@ def cnms_body_template():
def cnms_files_template():
return initialize_template(constants.CNM_FILES_TEMPLATE)


def _open_text(anchor, name):
for t in files(anchor).iterdir():
if t.name == name:
return t.read_text()
return None


def initialize_template(resource_location):
return Template(_open_text(*resource_location))


def validate(configuration, content_type):
"""
Validate local CNM or UMM-G (JSON) files
Expand Down

0 comments on commit 4df2dfb

Please sign in to comment.