Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#3138)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 24.2.0 → 24.3.0](psf/black@24.2.0...24.3.0)

* Update

* Revert "Update"

This reverts commit c16272c.

* Update also blacken-docs

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](codespell-project/codespell@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 <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and germa89 authored May 28, 2024
1 parent 74866a1 commit eb7a275
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/extended_examples/executable/rotor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,8 @@ Windows Subsystem
Windows Subsystem for Linux
wsl
WSL
Zhu
Zhu
THIRDPARTY
askin
Hashin
WHIT
12 changes: 7 additions & 5 deletions src/ansys/mapdl/core/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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]

Expand Down

0 comments on commit eb7a275

Please sign in to comment.