Skip to content

Commit

Permalink
Enable isort (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Apr 3, 2021
1 parent 6e4e092 commit 9647d8f
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.8.0
hooks:
- id: isort
args:
# https://github.com/pre-commit/mirrors-isort/issues/9#issuecomment-624404082
- --filter-files
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
Expand Down
1 change: 0 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ disable =
no-value-for-parameter,
not-an-iterable,
too-few-public-methods,
wrong-import-order,
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ build-backend = "setuptools.build_meta"

[tool.black]
line-length = 99

[tool.isort]
profile = "black"
2 changes: 1 addition & 1 deletion src/mk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""init code of mk module."""
from importlib_metadata import version, PackageNotFoundError
from importlib_metadata import PackageNotFoundError, version

try:
__version__ = version(__name__)
Expand Down
13 changes: 7 additions & 6 deletions src/mk/__main__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""Main module."""
import logging
import itertools
import logging
import os
from typing import List

import typer
from rich.logging import RichHandler
from rich.console import Console
from mk.ctx import ctx
from mk import __version__
from typing import List
import os
from rich.logging import RichHandler

from mk import __version__
from mk.ctx import ctx

app = typer.Typer()
handlers: List[logging.Handler]
Expand Down
3 changes: 2 additions & 1 deletion src/mk/ctx.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from mk.runner import Runner
from typing import Optional

from mk.runner import Runner


class Context:
def __init__(self) -> None:
Expand Down
8 changes: 5 additions & 3 deletions src/mk/runner.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import logging
import git
from pathlib import Path
import subprocess
import sys
from mk.tools import Tool, Action
from pathlib import Path
from typing import List

import git

from mk.tools import Action, Tool


class Runner:
def __init__(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/mk/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import subprocess
from typing import List, Optional, Any
from typing import Any, List, Optional


class Action:
Expand Down
1 change: 1 addition & 0 deletions test/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from subprocess import run

import pytest


Expand Down

0 comments on commit 9647d8f

Please sign in to comment.