Skip to content

Commit

Permalink
added codestyle through isort, black and flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Luca van den Busch committed Jan 28, 2024
1 parent 8c99984 commit 5647df1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 88
max-doc-length = 80
extend-ignore = E203 E501 W505
per-file-ignores =
src/yaw/__init__.py: E402
7 changes: 7 additions & 0 deletions balltree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
__version__ = "0.1"

from ._balltree import BallTree, default_leafsize
from .angulartree import AngularTree

__all__ = [
"AngularTree",
"BallTree",
"default_leafsize",
]
25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ dependencies = [

[project.optional-dependencies]
test = ["pytest",]
dev = [
"balltree[test]",
"isort",
"black",
"flake8",
]

[tool.setuptools.dynamic]
version = {attr = "balltree.__version__"}
Expand All @@ -33,3 +39,22 @@ where = ["."]

[tool.pytest.ini_options]
testpaths = ["tests",]

[tool.isort]
profile = "black"

[tool.black]
include = ".pyi?$"
exclude = """
/(
.git
| .hg
| .mypy_cache
| .tox
| .venv
| _build
| buck-out
| build
| dist
)/
"""
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
numpy
pytest
pytest
black
isort
flake8

0 comments on commit 5647df1

Please sign in to comment.