Skip to content

Commit

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

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
- [github.com/google/keep-sorted: v0.3.0 → v0.4.0](google/keep-sorted@v0.3.0...v0.4.0)
- [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.3.5](astral-sh/ruff-pre-commit@v0.1.14...v0.3.5)
- [github.com/psf/black: 23.12.1 → 24.3.0](psf/black@23.12.1...24.3.0)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0)
- [github.com/shellcheck-py/shellcheck-py: v0.9.0.6 → v0.10.0.1](shellcheck-py/shellcheck-py@v0.9.0.6...v0.10.0.1)
- [github.com/commitizen-tools/commitizen: v3.13.0 → v3.21.3](commitizen-tools/commitizen@v3.13.0...v3.21.3)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* build: update tools

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: W. Augusto Andreoli <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and andreoliwa authored Apr 12, 2024
1 parent 91de27d commit a247aef
Show file tree
Hide file tree
Showing 52 changed files with 59 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ repos:
types: [python, toml]
stages: [commit]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/google/keep-sorted
rev: v0.3.0
rev: v0.4.0
hooks:
- id: keep-sorted
- repo: https://github.com/pappasam/toml-sort
Expand All @@ -52,7 +52,7 @@ repos:
# - poetry.lock: auto-generated file
exclude: (ideas/|resources/|tests/|poetry.lock)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.3.5
hooks:
- id: ruff
args: [--fix]
Expand All @@ -66,7 +66,7 @@ repos:
hooks:
- id: sort-all
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black
args: [--safe, --quiet]
Expand All @@ -86,7 +86,7 @@ repos:
- id: prettier
stages: [commit]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
# https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-show-error-codes
Expand Down Expand Up @@ -121,7 +121,7 @@ repos:
types: [python]
exclude: tests/
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/openstack/bashate
Expand All @@ -131,7 +131,7 @@ repos:
# https://docs.openstack.org/bashate/latest/man/bashate.html#options
args: [-i, E006]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
rev: v3.21.3
hooks:
- id: commitizen
stages: [commit-msg]
1 change: 1 addition & 0 deletions docs/autofix_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
It doesn't recognise the "styles" dir anywhere (on the root, under "docs", under "_static"...).
Not even changing ``html_static_path`` on ``conf.py`` worked.
"""

from __future__ import annotations

import sys
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
full list see the documentation:
http://www.sphinx-doc.org/en/master/config
"""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions docs/ideas/lab.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Laboratory of Nitpick ideas."""

import json
from pathlib import Path
from pprint import pprint
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ imagesize==1.4.1 ; python_version >= "3.8" and python_version < "4.0"
importlib-metadata==6.8.0 ; python_version >= "3.8" and python_version < "3.10"
importlib-resources==6.1.0 ; python_version >= "3.8" and python_version < "3.9"
iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
jinja2==3.1.2 ; python_version >= "3.8" and python_version < "4.0"
jinja2==3.1.3 ; python_version >= "3.8" and python_version < "4.0"
jmespath==1.0.1 ; python_version >= "3.8" and python_version < "4.0"
jsonschema-specifications==2023.7.1 ; python_version >= "3.8" and python_version < "4.0"
jsonschema==4.19.1 ; python_version >= "3.8" and python_version < "4.0"
Expand Down Expand Up @@ -57,7 +57,7 @@ sphinx-gitref==0.2.1 ; python_version >= "3.8" and python_version < "4.0"
sphinx-rtd-theme==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
sphinx==6.2.1 ; python_version >= "3.8" and python_version < "4.0"
sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.8" and python_version < "4.0"
sphinxcontrib-devhelp==1.0.6 ; python_version >= "3.8" and python_version < "4.0"
sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.8" and python_version < "4.0"
sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
sphinxcontrib-jquery==4.1 ; python_version >= "3.8" and python_version < "4.0"
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.8" and python_version < "4.0"
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Main module."""

from loguru import logger

from nitpick.constants import PROJECT_NAME
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- https://www.python.org/dev/peps/pep-0338/
- https://docs.python.org/3/using/cmdline.html#cmdoption-m
"""

from nitpick.cli import nitpick_cli # pragma: no cover
from nitpick.constants import PROJECT_NAME # pragma: no cover

Expand Down
1 change: 1 addition & 0 deletions src/nitpick/blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from nitpick.generic import *
"""

from __future__ import annotations

import abc
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Also see (1) from https://click.palletsprojects.com/en/5.x/setuptools/#setuptools-integration
"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Handle import compatibility issues."""

# pylint: skip-file
try:
from importlib.abc import Traversable # type: ignore[attr-defined]
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Special configurations."""

from attr import Factory, define # type: ignore[attr-defined]

from nitpick.typedefs import JsonDict
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants."""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The Nitpick application and project-related utilities."""

from __future__ import annotations

import itertools
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nitpick exceptions."""

from __future__ import annotations

import warnings
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/fields.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Custom Marshmallow fields and validators."""

import json

from marshmallow import ValidationError, fields
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/flake8.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Flake8 plugin to check files."""

import logging
from functools import lru_cache
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from nitpick.generic import *
"""

from __future__ import annotations

import subprocess
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
The hook specifications and the plugin classes are still experimental and considered as an internal API.
They might change at any time; use at your own risk.
"""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for file checkers."""

from __future__ import annotations

import abc
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Info needed by the plugins."""

from __future__ import annotations

from dataclasses import dataclass, field
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/ini.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""INI files."""

from __future__ import annotations

from configparser import ConfigParser, DuplicateOptionError, Error, MissingSectionHeaderError, ParsingError
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/json.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""JSON files."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Text files."""

from __future__ import annotations

from typing import TYPE_CHECKING, ClassVar, Iterator
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/toml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""TOML files."""

from __future__ import annotations

from itertools import chain
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/plugins/yaml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""YAML files."""

from __future__ import annotations

from itertools import chain
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/schemas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Marshmallow schemas."""

from __future__ import annotations

from marshmallow import Schema
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/style.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Style parsing and merging."""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/tomlkit_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Eventually, some of the code here should/could be proposed as pull requests to the original package.
"""

from __future__ import annotations

from functools import wraps
Expand Down
1 change: 1 addition & 0 deletions src/nitpick/typedefs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type definitions."""

from pathlib import Path
from typing import Any, Dict, Iterable, List, Tuple, Type, Union

Expand Down
1 change: 1 addition & 0 deletions src/nitpick/violations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Name inspired by `flake8's violations <https://flake8.pycqa.org/en/latest/user/error-codes.html>`_.
"""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- https://www.pyinvoke.org/
- https://docs.pyinvoke.org/en/stable/api/runners.html#invoke.runners.Runner.run
"""

from __future__ import annotations

import sys
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.tox/py38/lib/python3.8/site-packages/pytest_cov/plugin.py:271:
PytestWarning: Failed to generate report: No data to report.
"""

import logging
from pathlib import Path
from textwrap import dedent
Expand Down
1 change: 1 addition & 0 deletions tests/data/hello.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Some empty Python file."""

x = 1
print(x)
1 change: 1 addition & 0 deletions tests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test helpers."""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions tests/test_builtin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test built-in styles shipped as resources under the ``nitpick.resources`` module."""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/test_cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test cache."""

from datetime import timedelta

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""CLI tests."""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/test_generic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generic functions tests."""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions tests/test_ini.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test INI files."""

from configparser import ParsingError
from unittest import mock

Expand Down
1 change: 1 addition & 0 deletions tests/test_json.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""JSON tests."""

import warnings

from nitpick.constants import JAVASCRIPT_PACKAGE_JSON, READ_THE_DOCS_URL
Expand Down
1 change: 1 addition & 0 deletions tests/test_meta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Meta tests for sanity check purposes."""

import json
from configparser import ConfigParser
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plugin tests."""

import os
from enum import Enum

Expand Down
1 change: 1 addition & 0 deletions tests/test_project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config tests."""

import os
import shutil

Expand Down
1 change: 1 addition & 0 deletions tests/test_style.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Style tests."""

import warnings
from pathlib import Path
from textwrap import dedent
Expand Down
1 change: 1 addition & 0 deletions tests/test_text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Text file tests."""

from nitpick.constants import READ_THE_DOCS_URL
from nitpick.violations import Fuss
from tests.helpers import NBSP, SUGGESTION_BEGIN, SUGGESTION_END, ProjectMock
Expand Down
1 change: 1 addition & 0 deletions tests/test_toml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""TOML tests."""

from nitpick.constants import PYTHON_PYPROJECT_TOML
from nitpick.plugins.toml import TomlPlugin
from nitpick.violations import Fuss, SharedViolations
Expand Down
1 change: 1 addition & 0 deletions tests/test_tomlkit_ext.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the tomlkit extensions."""

from pathlib import Path
from textwrap import dedent

Expand Down
1 change: 1 addition & 0 deletions tests/test_violations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Violations."""

from textwrap import dedent

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_yaml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""YAML tests."""

import warnings

from nitpick.plugins.yaml import YamlPlugin
Expand Down
1 change: 1 addition & 0 deletions tests/test_yaml_github_workflows.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test GitHub workflows."""

from nitpick.violations import Fuss
from tests.helpers import ProjectMock

Expand Down
1 change: 1 addition & 0 deletions tests/test_yaml_old_pre_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Read the warning on :py:class:`nitpick.plugins.yaml.YamlPlugin`.
"""

import warnings

import pytest
Expand Down
Loading

0 comments on commit a247aef

Please sign in to comment.