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

Turn on isort for ruff #1128

Merged
merged 4 commits into from
May 22, 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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Feat

- **config_files**: add suport for "cz.toml" config file
- **config_files**: add support for "cz.toml" config file

## v3.26.2 (2024-05-22)

Expand Down
3 changes: 1 addition & 2 deletions commitizen/changelog_formats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import importlib_metadata as metadata

from commitizen.changelog import Metadata
from commitizen.exceptions import ChangelogFormatUnknown
from commitizen.config.base_config import BaseConfig

from commitizen.exceptions import ChangelogFormatUnknown

CHANGELOG_FORMAT_ENTRYPOINT = "commitizen.changelog_format"
TEMPLATE_EXTENSION = "j2"
Expand Down
2 changes: 1 addition & 1 deletion commitizen/changelog_formats/restructuredtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
import sys
from itertools import zip_longest
from typing import IO, TYPE_CHECKING, Any, Union, Tuple
from typing import IO, TYPE_CHECKING, Any, Tuple, Union

from commitizen.changelog import Metadata

Expand Down
4 changes: 2 additions & 2 deletions commitizen/commands/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import questionary

from commitizen import bump, factory, git, hooks, out
from commitizen.changelog_formats import get_changelog_format
from commitizen.commands.changelog import Changelog
from commitizen.config import BaseConfig
from commitizen.exceptions import (
Expand All @@ -21,13 +22,12 @@
NotAllowed,
NoVersionSpecifiedError,
)
from commitizen.changelog_formats import get_changelog_format
from commitizen.providers import get_provider
from commitizen.version_schemes import (
get_version_scheme,
Increment,
InvalidVersion,
Prerelease,
get_version_scheme,
)

logger = getLogger("commitizen")
Expand Down
7 changes: 3 additions & 4 deletions commitizen/commands/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
from typing import Callable, cast

from commitizen import bump, changelog, defaults, factory, git, out

from commitizen.changelog_formats import get_changelog_format
from commitizen.config import BaseConfig
from commitizen.cz.base import MessageBuilderHook, ChangelogReleaseHook
from commitizen.cz.base import ChangelogReleaseHook, MessageBuilderHook
from commitizen.cz.utils import strip_local_version
from commitizen.exceptions import (
DryRunExit,
NoCommitsFoundError,
Expand All @@ -18,10 +19,8 @@
NotAGitProjectError,
NotAllowed,
)
from commitizen.changelog_formats import get_changelog_format
from commitizen.git import GitTag, smart_open
from commitizen.version_schemes import get_version_scheme
from commitizen.cz.utils import strip_local_version


class Changelog:
Expand Down
1 change: 0 additions & 1 deletion commitizen/commands/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import contextlib
import os


import questionary

from commitizen import factory, git, out
Expand Down
1 change: 1 addition & 0 deletions commitizen/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import questionary
import yaml

from commitizen import cmd, factory, out
from commitizen.__version__ import __version__
from commitizen.config import BaseConfig, JsonConfig, TomlConfig, YAMLConfig
Expand Down
2 changes: 1 addition & 1 deletion commitizen/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path

from commitizen import defaults, git
from commitizen.exceptions import ConfigFileNotFound, ConfigFileIsEmpty
from commitizen.exceptions import ConfigFileIsEmpty, ConfigFileNotFound

from .base_config import BaseConfig
from .json_config import JsonConfig
Expand Down
2 changes: 1 addition & 1 deletion commitizen/config/json_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import json
from pathlib import Path
from commitizen.exceptions import InvalidConfigurationError

from commitizen.exceptions import InvalidConfigurationError
from commitizen.git import smart_open

from .base_config import BaseConfig
Expand Down
1 change: 1 addition & 0 deletions commitizen/config/toml_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from tomlkit import exceptions, parse, table

from commitizen.exceptions import InvalidConfigurationError

from .base_config import BaseConfig


Expand Down
2 changes: 1 addition & 1 deletion commitizen/config/yaml_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import yaml

from commitizen.git import smart_open
from commitizen.exceptions import InvalidConfigurationError
from commitizen.git import smart_open

from .base_config import BaseConfig

Expand Down
4 changes: 2 additions & 2 deletions commitizen/cz/utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import re
import os
import re
import tempfile

from commitizen.cz import exceptions
from commitizen import git
from commitizen.cz import exceptions


def required_validator(answer, msg=None):
Expand Down
4 changes: 1 addition & 3 deletions commitizen/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import pathlib
from collections import OrderedDict
from typing import Any, Iterable, MutableMapping

from typing import TypedDict
from typing import Any, Iterable, MutableMapping, TypedDict

# Type
Questions = Iterable[MutableMapping[str, Any]]
Expand Down
1 change: 0 additions & 1 deletion commitizen/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from commitizen.config.base_config import BaseConfig
from commitizen.exceptions import VersionProviderUnknown

from commitizen.providers.base_provider import VersionProvider
from commitizen.providers.cargo_provider import CargoProvider
from commitizen.providers.commitizen_provider import CommitizenProvider
Expand Down
1 change: 0 additions & 1 deletion commitizen/providers/cargo_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import tomlkit


from commitizen.providers.base_provider import TomlProvider


Expand Down
1 change: 0 additions & 1 deletion commitizen/providers/commitizen_provider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations


from commitizen.providers.base_provider import VersionProvider


Expand Down
1 change: 0 additions & 1 deletion commitizen/providers/composer_provider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations


from commitizen.providers.base_provider import JsonProvider


Expand Down
1 change: 0 additions & 1 deletion commitizen/providers/npm_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from pathlib import Path
from typing import Any, ClassVar


from commitizen.providers.base_provider import VersionProvider


Expand Down
1 change: 0 additions & 1 deletion commitizen/providers/pep621_provider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations


from commitizen.providers.base_provider import TomlProvider


Expand Down
1 change: 0 additions & 1 deletion commitizen/providers/poetry_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import tomlkit


from commitizen.providers.base_provider import TomlProvider


Expand Down
6 changes: 2 additions & 4 deletions commitizen/providers/scm_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
import re
from typing import Callable


from commitizen.git import get_tags
from commitizen.providers.base_provider import VersionProvider
from commitizen.version_schemes import (
get_version_scheme,
InvalidVersion,
Version,
VersionProtocol,
get_version_scheme,
)

from commitizen.providers.base_provider import VersionProvider


class ScmProvider(VersionProvider):
"""
Expand Down
Loading
Loading