Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #3138

Merged
merged 7 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -1,4 +1,4 @@
[aA]nsys

Check notice on line 1 in doc/styles/config/vocabularies/ANSYS/accept.txt

View check run for this annotation

Wiz Inc. (572fc38784) / Wiz Data Scanner

Sensitive data found: Other/Ansys Product Library

Data Category: Other Data Classifier ID: CUSTOM-bf52ecf9-8981-496e-96f6-18c88acdd79f Sampled Examples: Key: line116 Key: line37
[Bb]ooleans
[Cc]odespace
[Cc]odespaces
Expand Down Expand Up @@ -177,4 +177,8 @@
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 @@
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 @@
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 @@

Parameters
----------
sufix : str
logger_name : str
Name of the logger.
level : str or int, optional
Level of logging
Expand All @@ -531,7 +533,7 @@
logging.logger
Logger class.
"""
name = self.logger.name + "." + sufix
name = self.logger.name + "." + logger_name

Check warning on line 536 in src/ansys/mapdl/core/logging.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/logging.py#L536

Added line #L536 was not covered by tests
self._instances[name] = self._make_child_logger(name, level)
return self._instances[name]

Expand Down