From eb7a275cb2c89584130620ef8376b9d691242814 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 08:06:19 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#3138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 24.2.0 → 24.3.0](https://github.com/psf/black/compare/24.2.0...24.3.0) * Update * Revert "Update" This reverts commit c16272cfedf7ed9326455be5a99f55bf32fb95c5. * Update also blacken-docs * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) * fixing codespell --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: German --- .pre-commit-config.yaml | 2 +- CODE_OF_CONDUCT.md | 2 +- .../extended_examples/executable/cli_rotor.py | 3 ++- .../examples/extended_examples/executable/rotor.py | 4 ++-- doc/styles/config/vocabularies/ANSYS/accept.txt | 6 +++++- src/ansys/mapdl/core/logging.py | 12 +++++++----- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5e83a352ca..8e5b778acc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,7 +44,7 @@ repos: - id: flake8 - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: ["--toml", "pyproject.toml", "--ignore-words", "doc/styles/config/vocabularies/ANSYS/accept.txt"] diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 35b5167093..2a2c9900f0 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -5,7 +5,7 @@ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, +identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. diff --git a/doc/source/examples/extended_examples/executable/cli_rotor.py b/doc/source/examples/extended_examples/executable/cli_rotor.py index 38f78888d4..49951e198a 100644 --- a/doc/source/examples/extended_examples/executable/cli_rotor.py +++ b/doc/source/examples/extended_examples/executable/cli_rotor.py @@ -20,7 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -# Script to calculate the first natural frequecy of a rotor for a given set of properties +# Script to calculate the first natural frequency of a rotor for a given set of +# properties import click # Import packages diff --git a/doc/source/examples/extended_examples/executable/rotor.py b/doc/source/examples/extended_examples/executable/rotor.py index 7240946b0d..9f24cba3c6 100644 --- a/doc/source/examples/extended_examples/executable/rotor.py +++ b/doc/source/examples/extended_examples/executable/rotor.py @@ -20,8 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -# Script to calculate the first natural frequecy of -# a rotor for a given set of properties +# Script to calculate the first natural frequency of a rotor for a given set of +# properties # Import packages import numpy as np diff --git a/doc/styles/config/vocabularies/ANSYS/accept.txt b/doc/styles/config/vocabularies/ANSYS/accept.txt index 2ddd75518e..40eb0a3847 100644 --- a/doc/styles/config/vocabularies/ANSYS/accept.txt +++ b/doc/styles/config/vocabularies/ANSYS/accept.txt @@ -177,4 +177,8 @@ Windows Subsystem Windows Subsystem for Linux wsl WSL -Zhu \ No newline at end of file +Zhu +THIRDPARTY +askin +Hashin +WHIT \ No newline at end of file diff --git a/src/ansys/mapdl/core/logging.py b/src/ansys/mapdl/core/logging.py index 6ee1f7cb62..2183946b62 100644 --- a/src/ansys/mapdl/core/logging.py +++ b/src/ansys/mapdl/core/logging.py @@ -464,14 +464,14 @@ def setLevel(self, level: LOG_LEVEL_TYPE = "DEBUG"): self._level = level def _make_child_logger( - self, sufix: str, level: Optional[LOG_LEVEL_TYPE] + self, logger_name: str, level: Optional[LOG_LEVEL_TYPE] ) -> logging.Logger: """Create a child logger. Uses ``getChild`` or copying attributes between ``pymapdl_global`` logger and the new one. """ - logger = logging.getLogger(sufix) + logger = logging.getLogger(logger_name) logger.std_out_handler = None logger.file_handler = None @@ -510,7 +510,9 @@ def _make_child_logger( logger.propagate = True return logger - def add_child_logger(self, sufix: str, level: Optional[LOG_LEVEL_TYPE] = None): + def add_child_logger( + self, logger_name: str, level: Optional[LOG_LEVEL_TYPE] = None + ): """Add a child logger to the main logger. This logger is more general than an instance logger which is designed to @@ -521,7 +523,7 @@ def add_child_logger(self, sufix: str, level: Optional[LOG_LEVEL_TYPE] = None): Parameters ---------- - sufix : str + logger_name : str Name of the logger. level : str or int, optional Level of logging @@ -531,7 +533,7 @@ def add_child_logger(self, sufix: str, level: Optional[LOG_LEVEL_TYPE] = None): logging.logger Logger class. """ - name = self.logger.name + "." + sufix + name = self.logger.name + "." + logger_name self._instances[name] = self._make_child_logger(name, level) return self._instances[name]