Skip to content

Commit

Permalink
Merge pull request #30 from lowe-lab-ucl/isort
Browse files Browse the repository at this point in the history
isort configuration
  • Loading branch information
paddyroddy authored Jun 29, 2022
2 parents 31b28e8 + 21233e7 commit 6305171
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ repos:
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
Expand Down
6 changes: 4 additions & 2 deletions napari_btrack/_tests/test_dock_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
from typing import Dict, Tuple
from unittest.mock import patch

import napari
import numpy as np
import numpy.typing as npt
import pytest
from magicgui.widgets import Container

import napari

from btrack import datasets
from btrack.config import load_config
from btrack.datasets import cell_config, particle_config
from magicgui.widgets import Container

from ..track import _update_widgets_from_config, _widgets_to_tracker_config, track

Expand Down
18 changes: 10 additions & 8 deletions napari_btrack/track.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
from dataclasses import dataclass, field
from typing import Any, Dict, List, Tuple, Union
from dataclasses import field, dataclass

import btrack
import napari
import numpy as np
import numpy.typing as npt
from magicgui.application import use_app
from magicgui.types import FileDialogMode
from magicgui.widgets import Container, PushButton, Widget, create_widget
from pydantic import BaseModel
from PyQt5.QtWidgets import QScrollArea

import napari

import btrack
from btrack import datasets
from btrack.config import (
HypothesisModel,
Expand All @@ -14,11 +21,6 @@
save_config,
)
from btrack.utils import segmentation_to_objects
from magicgui.application import use_app
from magicgui.types import FileDialogMode
from magicgui.widgets import Container, PushButton, Widget, create_widget
from pydantic import BaseModel
from PyQt5.QtWidgets import QScrollArea

default_cell_config = load_config(datasets.cell_config())

Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[tool.black]
target-version = ['py38', 'py39', 'py310']
skip-string-normalization = false
line-length = 88
exclude = '''
(
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| build
| dist
| examples
)/
)
'''

[tool.isort]
profile = "black"
length_sort = "False"
length_sort_sections = "stdlib"
known_first_party = "btrack"
known_napari = "napari"
sections = ["STDLIB", "THIRDPARTY", "NAPARI", "FIRSTPARTY", "LOCALFOLDER"]
skip_gitignore = "True"

0 comments on commit 6305171

Please sign in to comment.