From 78c4a8e5cc73e994586334e1af4442185b445b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Thu, 4 Jul 2024 11:43:33 -0700 Subject: [PATCH] style: remove white-space and reformat docstrings in db module --- .cz.toml | 2 +- .devcontainer.json | 2 +- .editorconfig | 7 ++++--- .flake8 | 2 +- .isort.cfg | 2 +- .mailmap | 2 +- .mypy.ini | 2 +- .pydocstyle | 2 +- Makefile | 2 +- src/incendium/__about__.py | 2 +- src/incendium/db.py | 11 +++++------ 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.cz.toml b/.cz.toml index 1e3cddb..29b758f 100644 --- a/.cz.toml +++ b/.cz.toml @@ -6,5 +6,5 @@ version_scheme = "pep440" version = "2024.5.0" update_changelog_on_bump = true version_files = [ - "src/incendium/__about__.py:__version__" + "src/incendium/__about__.py:__version__" ] diff --git a/.devcontainer.json b/.devcontainer.json index d9dc092..8190a61 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -15,4 +15,4 @@ } }, "onCreateCommand": "pre-commit install && pre-commit install --hook-type commit-msg" -} +} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 794e30b..43ca6f3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,18 +5,19 @@ root = true [*] end_of_line = lf -insert_final_newline = true trim_trailing_whitespace = true [Makefile] indent_style = tab -[{*.md,*.yaml,*.yml}] +[*.{md,toml,yaml,yml}] indent_style = space indent_size = 2 +insert_final_newline = true x-soft-wrap-text = true [*.py] charset = utf-8 indent_style = space -indent_size = 4 +insert_final_newline = true +indent_size = 4 \ No newline at end of file diff --git a/.flake8 b/.flake8 index a630fd4..d8467a4 100644 --- a/.flake8 +++ b/.flake8 @@ -2,4 +2,4 @@ ignore = F821 max-complexity = 10 max-doc-length = 72 -max-line-length = 88 +max-line-length = 88 \ No newline at end of file diff --git a/.isort.cfg b/.isort.cfg index a955e4f..6053f8b 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,4 +1,4 @@ [isort] extra_standard_library = typing profile = black -py_version = 27 +py_version = 27 \ No newline at end of file diff --git a/.mailmap b/.mailmap index 68dd19e..fd04ba9 100644 --- a/.mailmap +++ b/.mailmap @@ -1,3 +1,3 @@ César Román César Román César Román César Román -César Román Cesar Roman +César Román Cesar Roman \ No newline at end of file diff --git a/.mypy.ini b/.mypy.ini index 776dedf..c9ef72c 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -3,4 +3,4 @@ enable_error_code = ignore-without-code mypy_path = $MYPY_CONFIG_FILE_DIR/src python_version = 2.7 strict = true -warn_return_any = true +warn_return_any = true \ No newline at end of file diff --git a/.pydocstyle b/.pydocstyle index 7228966..7a58142 100644 --- a/.pydocstyle +++ b/.pydocstyle @@ -1,3 +1,3 @@ [pydocstyle] add_select = D400, D401 -convention = google +convention = google \ No newline at end of file diff --git a/Makefile b/Makefile index 6b00e25..48879e2 100644 --- a/Makefile +++ b/Makefile @@ -58,4 +58,4 @@ install-nocache: check ## Install this package using Jython with caching disable install-nodeps: check ## Install this package without dependencies. @echo "Installing package without dependencies…" - jython -m pip install --no-deps . + jython -m pip install --no-deps . \ No newline at end of file diff --git a/src/incendium/__about__.py b/src/incendium/__about__.py index ffe615f..ea86090 100644 --- a/src/incendium/__about__.py +++ b/src/incendium/__about__.py @@ -8,4 +8,4 @@ __author__ = "César Román" __author_email__ = "cesar@coatl.dev" __license__ = "MIT" -__copyright__ = "Copyright (C) 2018-2024 coatl.dev" +__copyright__ = "Copyright (c) 2018-2024 coatl.dev" diff --git a/src/incendium/db.py b/src/incendium/db.py index b13684d..d966518 100644 --- a/src/incendium/db.py +++ b/src/incendium/db.py @@ -48,10 +48,9 @@ def __init__(self, database, retries=3): """Disposable Connection initializer. Args: - database: The name of the database connection in - Ignition. - retries: The number of additional times to retry - enabling the connection. Optional. + database: The name of the database connection in Ignition. + retries: The number of additional times to retry enabling + the connection. Optional. """ super(DisposableConnection, self).__init__() self._database = database @@ -177,8 +176,8 @@ def __init__(self, name_or_index, type_code, value): """Create an instance of InParam. Args: - name_or_index: Index (int starting at 1, not 0), or - name (str). + name_or_index: Index (int starting at 1, not 0), or name + (str). type_code: Type code constant from `system.db`. value: Value of type type_code. """