diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 885101b..fc4c9fc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,9 +4,9 @@ exclude: | ^docs/conf.py$ ) repos: - - repo: https://github.com/pre-commit/mirrors-prettier + - repo: https://github.com/pycontribs/mirrors-prettier # keep it before yamllint - rev: v3.0.0-alpha.6 + rev: v3.3.1 hooks: - id: prettier always_run: true @@ -15,16 +15,16 @@ repos: - prettier-plugin-toml - prettier-plugin-sort-json - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 24.4.2 hooks: - id: black language_version: python3 - repo: https://github.com/pre-commit/pre-commit-hooks.git - rev: v4.4.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -35,7 +35,7 @@ repos: - id: debug-statements language_version: python3 - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: @@ -45,14 +45,14 @@ repos: - flake8-docstrings>=1.5.0 language_version: python3 - repo: https://github.com/adrienverge/yamllint.git - rev: v1.29.0 + rev: v1.35.1 hooks: - id: yamllint files: \.(yaml|yml)$ types: [file, yaml] entry: yamllint --strict - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.1.1 + rev: v1.10.0 hooks: - id: mypy # empty args needed in order to match mypy cli behavior @@ -63,7 +63,7 @@ repos: - packaging - rich>=11.0.0 - repo: https://github.com/pycqa/pylint - rev: v2.17.0 + rev: v3.2.3 hooks: - id: pylint # see https://github.com/PyCQA/pylint/issues/6535 diff --git a/src/enrich/console.py b/src/enrich/console.py index 1651f9c..73a2482 100644 --- a/src/enrich/console.py +++ b/src/enrich/console.py @@ -1,4 +1,5 @@ """Module that helps integrating with rich library.""" + import os import sys from typing import Any, TextIO diff --git a/src/enrich/logging.py b/src/enrich/logging.py index 0a07476..5ac0717 100644 --- a/src/enrich/logging.py +++ b/src/enrich/logging.py @@ -1,4 +1,5 @@ """Implements enriched RichHandler""" + from datetime import datetime from typing import TYPE_CHECKING, Any, Iterable, Optional diff --git a/test/test_console.py b/test/test_console.py index cfb83fd..31f99b3 100644 --- a/test/test_console.py +++ b/test/test_console.py @@ -1,4 +1,5 @@ """Tests for rich module.""" + import io import sys @@ -43,6 +44,7 @@ def test_console_soft_wrap() -> None: ) text = 21 * "x" console.print(text, end="") + # pylint: disable=no-member assert console.file.getvalue() == text # type: ignore result = console.export_text() assert text in result diff --git a/test/test_logging.py b/test/test_logging.py index b06872c..cf6cf87 100644 --- a/test/test_logging.py +++ b/test/test_logging.py @@ -1,4 +1,5 @@ """Tests related to enriched RichHandler""" + import io import logging import re