Commit 60f866e3 authored by Joseph Siddons's avatar Joseph Siddons
Browse files

chore: add lint rules for test, ruff fixes for test

parent 8cf21307
......@@ -52,7 +52,7 @@ all = [
line-length = 80
indent-width = 4
target-version = "py311"
exclude = [".eggs", ".git", ".venv", "build", "venv", "test"]
exclude = [".eggs", ".git", ".venv", "build", "venv"]
[tool.ruff.lint]
extend-select = [
......@@ -76,6 +76,10 @@ select = [
"W", # pycodestyle warnings
]
[tool.ruff.lint.per-file-ignores]
"docs/*.py" = ["D100", "D101", "D102", "D103"]
"test/**/*test*.py" = ["D100", "D101", "D102", "D103", "N802", "S101"]
[tool.ruff.format]
quote-style = "double" # Like Black, use double quotes for strings.
indent-style = "space" # Like Black, indent with spaces, rather than tabs.
......@@ -102,6 +106,4 @@ quiet-level = 3
Repository = "https://git.noc.ac.uk/nocsurfaceprocesses/geospatialtools"
[dependency-groups]
dev = [
"bpython>=0.25",
]
dev = ["bpython>=0.25"]
......@@ -2,7 +2,7 @@ import unittest
import random
from numpy import min, argmin
from GeoSpatialTools import haversine, KDTree, Record
from GeoSpatialTools import KDTree, Record
class TestKDTree(unittest.TestCase):
......@@ -87,7 +87,7 @@ class TestKDTree(unittest.TestCase):
kt.insert(Record(45, -21, uid="1"))
kt.insert(Record(45, -21, uid="2"))
r, d = kt.query(Record(44, -21, uid="3"))
r, _ = kt.query(Record(44, -21, uid="3"))
assert len(r) == 2
def test_wrap(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment