File tree Expand file tree Collapse file tree 8 files changed +16
-14
lines changed Expand file tree Collapse file tree 8 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ This should be run from the directory that contains the Makefile for
88building the documentation.
99"""
1010
11- from doc_builder import build_docs
11+ from doc_builder import build_docs # pylint: disable=import-error
1212
1313if __name__ == "__main__" :
1414 build_docs .main ()
Original file line number Diff line number Diff line change 44Loop through all versions of the documentation, building each and moving it to a directory for
55publication.
66
7- # Adapted from https://www.codingwiththomas.com/blog/my-sphinx-best-practice-for-a-multiversion-documentation-in-different-languages
8- # (last visited 2025-05-20)
7+ Adapted from https://www.codingwiththomas.com/blog/my-sphinx-best-practice-for-a-multiversion-
8+ documentation-in-different-languages
9+ (last visited 2025-05-20)
910"""
1011
1112import sys
@@ -33,7 +34,6 @@ from version_list import (
3334
3435
3536# Path to certain important files
36- # TODO: Make these cmd-line options
3737SOURCE = "source"
3838VERSIONS_PY = os .path .join ("version_list.py" )
3939MAKEFILE = "Makefile"
@@ -110,6 +110,10 @@ def check_version_list():
110110
111111
112112def main ():
113+ """
114+ Loop through all versions of the documentation, building each and moving it to a directory for
115+ publication.
116+ """
113117 # Set up parser
114118 parser = argparse .ArgumentParser ()
115119
Original file line number Diff line number Diff line change 44
55import os
66import pathlib
7- from doc_builder import sys_utils
7+ from doc_builder import sys_utils # pylint: disable=import-error
88
99DEFAULT_DOCKER_IMAGE = "ghcr.io/escomp/ctsm/ctsm-docs:v1.0.1"
1010
@@ -75,8 +75,6 @@ def get_build_command(
7575 warnings_as_warnings = False ,
7676 docker_image = DEFAULT_DOCKER_IMAGE ,
7777 conf_py_path = None ,
78- static_path = None ,
79- templates_path = None ,
8078):
8179 # pylint: disable=too-many-arguments,too-many-locals
8280 """Return a string giving the build command.
Original file line number Diff line number Diff line change 33group.
44"""
55
6- import os
7-
86# pylint: disable=import-error,no-name-in-module
97from .build_commands import DEFAULT_DOCKER_IMAGE
108
Original file line number Diff line number Diff line change @@ -19,10 +19,10 @@ def check_permanent_file(filename):
1919 cmd = f"git add . && git diff --quiet { filename } && git diff --cached --quiet { filename } "
2020 try :
2121 subprocess .check_output (cmd , shell = True )
22- except subprocess .CalledProcessError as e :
22+ except subprocess .CalledProcessError as exception :
2323 subprocess .check_output ("git reset" , shell = True ) # Unstage files staged by `git add`
2424 msg = f"Important file/submodule may contain uncommitted changes: '{ filename } '"
25- raise RuntimeError (msg ) from e
25+ raise RuntimeError (msg ) from exception
2626
2727
2828def get_git_head_or_branch ():
Original file line number Diff line number Diff line change 55import unittest
66
77import os
8- from doc_builder .build_docs import is_web_url , commandline_options
8+ from doc_builder .build_docs import is_web_url , commandline_options # pylint: disable=import-error
99
1010
1111class TestCmdlineArgs (unittest .TestCase ):
Original file line number Diff line number Diff line change 55import os
66import unittest
77from unittest .mock import patch
8- from doc_builder .build_commands import get_build_command
8+ from doc_builder .build_commands import get_build_command # pylint: disable=import-error
99
1010# Allow names that pylint doesn't like, because otherwise I find it hard
1111# to make readable unit test names
Original file line number Diff line number Diff line change 1212 # For python3
1313 from unittest import mock
1414import os
15+
16+ # pylint: disable=import-error,no-name-in-module
1517from test .test_utils .sys_utils_fake import (
1618 make_fake_isdir ,
17- ) # pylint: disable=import-error,no-name-in-module
19+ )
1820from doc_builder .build_commands import get_build_dir
1921
2022
You can’t perform that action at this time.
0 commit comments