From 00185fc693a39b521eaabb84b3addf2e87d67506 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:44:38 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/Lucas-C/pre-commit-hooks: v1.5.4 → v1.5.5](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.5.4...v1.5.5) - [github.com/rhysd/actionlint: v1.6.26 → v1.6.27](https://github.com/rhysd/actionlint/compare/v1.6.26...v1.6.27) - [github.com/adrienverge/yamllint: v1.33.0 → v1.35.1](https://github.com/adrienverge/yamllint/compare/v1.33.0...v1.35.1) - [github.com/DavidAnson/markdownlint-cli2: v0.10.0 → v0.12.1](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.10.0...v0.12.1) - [github.com/psf/black: 23.11.0 → 24.3.0](https://github.com/psf/black/compare/23.11.0...24.3.0) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) - [github.com/kumaraditya303/mirrors-pyright: v1.1.335 → v1.1.354](https://github.com/kumaraditya303/mirrors-pyright/compare/v1.1.335...v1.1.354) - [github.com/PyCQA/bandit: 1.7.5 → 1.7.8](https://github.com/PyCQA/bandit/compare/1.7.5...1.7.8) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f3a465..b54b208 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: check-toml - id: check-json - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.4 + rev: v1.5.5 hooks: - id: remove-crlf - repo: https://github.com/codespell-project/codespell @@ -46,11 +46,11 @@ repos: hooks: - id: check-mailmap - repo: https://github.com/rhysd/actionlint - rev: v1.6.26 + rev: v1.6.27 hooks: - id: actionlint - repo: https://github.com/adrienverge/yamllint - rev: v1.33.0 + rev: v1.35.1 hooks: - id: yamllint - repo: https://github.com/executablebooks/mdformat @@ -67,7 +67,7 @@ repos: - mdformat-black - mdformat-config - repo: https://github.com/DavidAnson/markdownlint-cli2 - rev: v0.10.0 + rev: v0.12.1 hooks: - id: markdownlint-cli2 additional_dependencies: @@ -78,11 +78,11 @@ repos: - id: update-CITATION.cff - id: update-pyproject.toml - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 24.3.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/pycqa/pydocstyle @@ -92,11 +92,11 @@ repos: additional_dependencies: - tomli - repo: https://github.com/kumaraditya303/mirrors-pyright - rev: v1.1.335 + rev: v1.1.354 hooks: - id: pyright - repo: https://github.com/PyCQA/bandit - rev: 1.7.5 + rev: 1.7.8 hooks: - id: bandit args: From 6f23de914918dad0de51e549bb77eb775f61ce7a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:44:55 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 1 + src/repl_python_wakatime/__init__.py | 1 + src/repl_python_wakatime/hooks/codestats.py | 1 + src/repl_python_wakatime/hooks/wakatime.py | 1 + src/repl_python_wakatime/ipython.py | 1 + src/repl_python_wakatime/ptpython.py | 1 + src/repl_python_wakatime/python.py | 1 + src/repl_python_wakatime/utils/api.py | 1 + src/repl_python_wakatime/utils/project.py | 1 + tests/test_api.py | 1 + tests/test_project.py | 1 + 11 files changed, 11 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index a7bf753..b25b2eb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,7 @@ https://www.sphinx-doc.org/en/master/usage/configuration.html """ + from repl_python_wakatime import __version__ as version # type: ignore from repl_python_wakatime._metainfo import ( # type: ignore author, diff --git a/src/repl_python_wakatime/__init__.py b/src/repl_python_wakatime/__init__.py index 9b415f3..821dc74 100644 --- a/src/repl_python_wakatime/__init__.py +++ b/src/repl_python_wakatime/__init__.py @@ -1,6 +1,7 @@ r"""Provide ``__version__`` for `importlib.metadata.version() `_. """ + try: from ._version import __version__, __version_tuple__ # type: ignore except ImportError: # for setuptools-generate diff --git a/src/repl_python_wakatime/hooks/codestats.py b/src/repl_python_wakatime/hooks/codestats.py index a5cd2a9..2c54d3f 100644 --- a/src/repl_python_wakatime/hooks/codestats.py +++ b/src/repl_python_wakatime/hooks/codestats.py @@ -5,6 +5,7 @@ `_. """ + import json import logging import threading diff --git a/src/repl_python_wakatime/hooks/wakatime.py b/src/repl_python_wakatime/hooks/wakatime.py index 552e137..ddf3a35 100644 --- a/src/repl_python_wakatime/hooks/wakatime.py +++ b/src/repl_python_wakatime/hooks/wakatime.py @@ -3,6 +3,7 @@ Refer `create-plugin `_. """ + import os from subprocess import Popen # nosec: B404 from typing import Any, Callable diff --git a/src/repl_python_wakatime/ipython.py b/src/repl_python_wakatime/ipython.py index 8a2d311..0defc85 100644 --- a/src/repl_python_wakatime/ipython.py +++ b/src/repl_python_wakatime/ipython.py @@ -1,6 +1,7 @@ """ipython ========== """ + from typing import Any, Callable from IPython.terminal.interactiveshell import TerminalInteractiveShell diff --git a/src/repl_python_wakatime/ptpython.py b/src/repl_python_wakatime/ptpython.py index c9e9806..7837233 100644 --- a/src/repl_python_wakatime/ptpython.py +++ b/src/repl_python_wakatime/ptpython.py @@ -1,6 +1,7 @@ """ptpython =========== """ + from typing import Any, Callable from prompt_toolkit.formatted_text import AnyFormattedText diff --git a/src/repl_python_wakatime/python.py b/src/repl_python_wakatime/python.py index 79083fd..1337eb9 100644 --- a/src/repl_python_wakatime/python.py +++ b/src/repl_python_wakatime/python.py @@ -1,6 +1,7 @@ """python ========= """ + import sys from typing import Any, Callable diff --git a/src/repl_python_wakatime/utils/api.py b/src/repl_python_wakatime/utils/api.py index 144ccb6..30cd103 100644 --- a/src/repl_python_wakatime/utils/api.py +++ b/src/repl_python_wakatime/utils/api.py @@ -1,6 +1,7 @@ """API ====== """ + import logging import keyring diff --git a/src/repl_python_wakatime/utils/project.py b/src/repl_python_wakatime/utils/project.py index 70f8768..3cb01b0 100644 --- a/src/repl_python_wakatime/utils/project.py +++ b/src/repl_python_wakatime/utils/project.py @@ -1,6 +1,7 @@ """Project ========== """ + import os from typing import Callable diff --git a/tests/test_api.py b/tests/test_api.py index c31b2e4..bbf2f40 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,6 +1,7 @@ r"""Test API ============ """ + import pytest from repl_python_wakatime.hooks.codestats import CodeStats diff --git a/tests/test_project.py b/tests/test_project.py index 1e37996..32f1396 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -1,6 +1,7 @@ """Test Project =============== """ + import os from pathlib import Path