From 2e70439401ed72b8148b8aebf8bdc0b34a71a364 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Mon, 8 Jan 2024 16:09:30 -0700 Subject: [PATCH] remove bmipy.cmd bmipy._cmd --- pyproject.toml | 2 +- src/bmipy/__main__.py | 2 +- src/bmipy/{cmd.py => _cmd.py} | 0 src/bmipy/_template.py | 2 +- tests/cli_test.py | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename src/bmipy/{cmd.py => _cmd.py} (100%) diff --git a/pyproject.toml b/pyproject.toml index d921161..e8fec2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dynamic = [ text = "MIT" [project.scripts] -bmipy-render = "bmipy.cmd:main" +bmipy-render = "bmipy._cmd:main" [project.urls] documentation = "https://bmi.readthedocs.io" diff --git a/src/bmipy/__main__.py b/src/bmipy/__main__.py index 6820461..19d6a0c 100644 --- a/src/bmipy/__main__.py +++ b/src/bmipy/__main__.py @@ -1,7 +1,7 @@ """The bmipy-render command.""" from __future__ import annotations -from bmipy.cmd import main +from bmipy._cmd import main if __name__ == "__main__": raise SystemExit(main()) diff --git a/src/bmipy/cmd.py b/src/bmipy/_cmd.py similarity index 100% rename from src/bmipy/cmd.py rename to src/bmipy/_cmd.py diff --git a/src/bmipy/_template.py b/src/bmipy/_template.py index b12907e..3a7be02 100644 --- a/src/bmipy/_template.py +++ b/src/bmipy/_template.py @@ -52,7 +52,7 @@ def _render_func(self, name: str) -> str: return textwrap.indent(os.linesep.join(parts), " ") -def dedent_docstring(text: str | None, tabsize=4) -> str: +def dedent_docstring(text: str | None, tabsize: int = 4) -> str: """Dedent a docstring, ignoring indentation of the first line. Parameters diff --git a/tests/cli_test.py b/tests/cli_test.py index 4a00343..ff3adbc 100644 --- a/tests/cli_test.py +++ b/tests/cli_test.py @@ -4,7 +4,7 @@ import sys import pytest -from bmipy.cmd import main +from bmipy._cmd import main def test_cli_version(capsys):