Skip to content

Commit

Permalink
Add isort (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
daneah authored Jan 25, 2024
1 parent e2f6a19 commit 9a36a3a
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Use `strict` for mypy type checking on source and tests
- Add isort to order imports consistently

## [0.0.7] - 2024-01-21

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 120
target-version = ['py39', 'py312']

[tool.isort]
profile = "black"
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ commands =
skip_install = True
deps =
black
isort
commands =
black {posargs:--check --diff src test}
isort {posargs:--check --diff src test}

[testenv:lint]
skip_install = True
Expand Down
2 changes: 1 addition & 1 deletion src/repo_man/commands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import click

from repo_man.consts import REPO_TYPES_CFG
from repo_man.utils import pass_config, ensure_config_file_exists
from repo_man.utils import ensure_config_file_exists, pass_config


@click.command
Expand Down
2 changes: 1 addition & 1 deletion src/repo_man/commands/flavors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import click

from repo_man.utils import pass_config, ensure_config_file_exists
from repo_man.utils import ensure_config_file_exists, pass_config


@click.command
Expand Down
2 changes: 1 addition & 1 deletion src/repo_man/commands/list_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import click

from repo_man.utils import parse_repo_types, pass_config, ensure_config_file_exists
from repo_man.utils import ensure_config_file_exists, parse_repo_types, pass_config


@click.command(name="list", help="The type of repository to manage")
Expand Down
2 changes: 1 addition & 1 deletion src/repo_man/commands/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import click

from repo_man.consts import REPO_TYPES_CFG
from repo_man.utils import parse_repo_types, pass_config, ensure_config_file_exists
from repo_man.utils import ensure_config_file_exists, parse_repo_types, pass_config


@click.command(name="remove", help="Remove a repository from one or more types")
Expand Down
1 change: 0 additions & 1 deletion src/repo_man/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from repo_man.consts import REPO_TYPES_CFG


pass_config = click.make_pass_decorator(configparser.ConfigParser)


Expand Down
2 changes: 1 addition & 1 deletion test/test_edit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
from unittest.mock import patch, Mock
from unittest.mock import Mock, patch

import click

Expand Down
2 changes: 1 addition & 1 deletion test/test_list_repos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import configparser
from unittest.mock import patch, Mock
from typing import Callable
from unittest.mock import Mock, patch

import click

Expand Down

0 comments on commit 9a36a3a

Please sign in to comment.