Skip to content

Commit 8281cae

Browse files
committed
Satisfy pylint.
1 parent 3e5dd16 commit 8281cae

File tree

8 files changed

+16
-14
lines changed

8 files changed

+16
-14
lines changed

build_docs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This should be run from the directory that contains the Makefile for
88
building the documentation.
99
"""
1010

11-
from doc_builder import build_docs
11+
from doc_builder import build_docs # pylint: disable=import-error
1212

1313
if __name__ == "__main__":
1414
build_docs.main()

build_docs_to_publish

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
Loop through all versions of the documentation, building each and moving it to a directory for
55
publication.
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

1112
import sys
@@ -33,7 +34,6 @@ from version_list import (
3334

3435

3536
# Path to certain important files
36-
# TODO: Make these cmd-line options
3737
SOURCE = "source"
3838
VERSIONS_PY = os.path.join("version_list.py")
3939
MAKEFILE = "Makefile"
@@ -110,6 +110,10 @@ def check_version_list():
110110

111111

112112
def 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

doc_builder/build_commands.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import os
66
import pathlib
7-
from doc_builder import sys_utils
7+
from doc_builder import sys_utils # pylint: disable=import-error
88

99
DEFAULT_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.

doc_builder/build_docs_shared_args.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
group.
44
"""
55

6-
import os
7-
86
# pylint: disable=import-error,no-name-in-module
97
from .build_commands import DEFAULT_DOCKER_IMAGE
108

doc_builder/sys_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

2828
def get_git_head_or_branch():

test/test_unit_cmdline_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import unittest
66

77
import 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

1111
class TestCmdlineArgs(unittest.TestCase):

test/test_unit_get_build_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66
import unittest
77
from 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

test/test_unit_get_build_dir.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
# For python3
1313
from unittest import mock
1414
import os
15+
16+
# pylint: disable=import-error,no-name-in-module
1517
from test.test_utils.sys_utils_fake import (
1618
make_fake_isdir,
17-
) # pylint: disable=import-error,no-name-in-module
19+
)
1820
from doc_builder.build_commands import get_build_dir
1921

2022

0 commit comments

Comments
 (0)