Skip to content

Commit

Permalink
resolving conflicts between isort and black
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjian_zhang committed Aug 14, 2024
1 parent d761f1a commit a486010
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ repos:
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
name: isort (python)
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 22.10.0
hooks:
- id: black
language_version: python3.10
2 changes: 1 addition & 1 deletion docly/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import click
from click import Context
from docly.log import init_log

from docly import __version__
from docly.config import settings
from docly.log import init_log


@click.group(invoke_without_command=True)
Expand Down
2 changes: 1 addition & 1 deletion docly/core/detection/dbnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def __init__(
use_dilation=False,
score_mode="fast",
box_type="quad",
**kwargs
**kwargs,
):
self.thresh = thresh
self.box_thresh = box_thresh
Expand Down
2 changes: 1 addition & 1 deletion docly/core/detection/yolov8 copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import cv2
import numpy as np
import onnxruntime as ort
from docly.utils import visual

from docly.config import __model_path__
from docly.utils import visual


class YOLOv8:
Expand Down
29 changes: 28 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,31 @@ testpaths = "tests"
python_files = "tests.py test_*.py *_tests.py"

[tool.pylint.design]
max-line-length = 120
max-line-length = 120

[tool.isort]
profile = "black"
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88

[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ envlist =
py310
isort
pylint
lint

[testenv]
deps =
Expand All @@ -24,3 +25,11 @@ changedir = {toxinidir}
commands =
poetry install -v
poetry run pylint tests docly

[testenv:lint]
deps =
isort
black
commands =
isort .
black .

0 comments on commit a486010

Please sign in to comment.