Skip to content

Commit

Permalink
one import per line
Browse files Browse the repository at this point in the history
  • Loading branch information
mcflugen committed Mar 5, 2024
1 parent 171ff3a commit bbe3b2c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ repos:
- id: isort
files: \.py$
exclude: ^babelizer/data
args: [--force-single-line-imports]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down
9 changes: 6 additions & 3 deletions babelizer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
else: # pragma: no cover (<PY312)
import importlib_resources


from .errors import OutputDirExistsError, ScanError, SetupPyError, ValidationError
from .errors import OutputDirExistsError
from .errors import ScanError
from .errors import SetupPyError
from .errors import ValidationError
from .metadata import BabelMetadata
from .render import render
from .utils import get_setup_py_version, save_files
from .utils import get_setup_py_version
from .utils import save_files

out = partial(click.secho, bold=True, err=True)
err = partial(click.secho, fg="red", err=True)
Expand Down
3 changes: 2 additions & 1 deletion babelizer/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
else: # pragma: no cover (<PY311)
import tomli as tomllib

from .errors import ScanError, ValidationError
from .errors import ScanError
from .errors import ValidationError


def validate_dict(meta, required=None, optional=None):
Expand Down
3 changes: 2 additions & 1 deletion babelizer/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
else: # pragma: no cover (<PY312)
import importlib_resources

from .errors import OutputDirExistsError, RenderError
from .errors import OutputDirExistsError
from .errors import RenderError


def render(plugin_metadata, output, template=None, clobber=False, version="0.1"):
Expand Down
3 changes: 2 additions & 1 deletion babelizer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import pathlib
import subprocess
import sys
from contextlib import contextmanager, suppress
from contextlib import contextmanager
from contextlib import suppress

from .errors import SetupPyError

Expand Down

0 comments on commit bbe3b2c

Please sign in to comment.