diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ab8787826..b32b189b29 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: no-commit-to-branch - repo: https://github.com/commitizen-tools/commitizen - rev: v3.2.1 # automatically updated by Commitizen + rev: v3.2.2 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index a6e883a71c..18238e6ca9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ +## v3.2.2 (2023-05-11) + +### Fix + +- **init**: fix is_pre_commit_installed method + ## v3.2.1 (2023-05-03) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 1da6a55523..1e3bed4cd5 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "3.2.1" +__version__ = "3.2.2" diff --git a/commitizen/commands/init.py b/commitizen/commands/init.py index 08fdadef77..351b91007d 100644 --- a/commitizen/commands/init.py +++ b/commitizen/commands/init.py @@ -4,8 +4,6 @@ import questionary import yaml -from packaging.version import Version - from commitizen import cmd, factory, out from commitizen.__version__ import __version__ from commitizen.config import BaseConfig, JsonConfig, TomlConfig, YAMLConfig @@ -14,6 +12,7 @@ from commitizen.exceptions import InitFailedError, NoAnswersError from commitizen.git import get_latest_tag_name, get_tag_names, smart_open from commitizen.version_types import VERSION_TYPES +from packaging.version import Version class ProjectInfo: @@ -66,7 +65,7 @@ def tags(self) -> Optional[List]: @property def is_pre_commit_installed(self) -> bool: - return not shutil.which("pre-commit") + return bool(shutil.which("pre-commit")) class Init: diff --git a/pyproject.toml b/pyproject.toml index 66a35ab524..c0d6311bf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.commitizen] -version = "3.2.1" +version = "3.2.2" tag_format = "v$version" version_files = [ "pyproject.toml:version", @@ -9,7 +9,7 @@ version_files = [ [tool.poetry] name = "commitizen" -version = "3.2.1" +version = "3.2.2" description = "Python commitizen client tool" authors = ["Santiago Fraire "] license = "MIT"