Skip to content

Commit

Permalink
Update ruff linting configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Feb 6, 2024
1 parent cd46292 commit 2c9ec4b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ include = [

[tool.ruff]
fix = true
target-version = "py38"

[tool.ruff.lint]
ignore = [
"ANN101",
"ANN102",
Expand Down Expand Up @@ -239,9 +242,8 @@ select = [
"W",
"YTT",
]
target-version = "py38"

[tool.ruff.extend-per-file-ignores]
[tool.ruff.lint.extend-per-file-ignores]
"tests/*.py" = [
"D101",
"D102",
Expand All @@ -254,7 +256,7 @@ target-version = "py38"
"E501",
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
force-single-line = true

[tool.setuptools]
Expand Down
23 changes: 23 additions & 0 deletions tests/gx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,29 @@ def test_multitrack(self) -> None:
assert "angles>" in track.to_string()
assert "when>" in track.to_string()

def test_from_multilinestring_and_tracks(self) -> None:
lines = geo.MultiLineString(
(((0, 0), (1, 1), (1, 2), (2, 2)), ((0.0, 0.0), (1.0, 2.0))),
)
track_items = [
TrackItem(
when=datetime.datetime(
2010,
5,
28,
2,
2,
55,
tzinfo=tzutc(),
),
coord=geo.Point(-122.203451, 37.374706, 141.800003),
angle=Angle(heading=1.0, tilt=2.0, roll=3.0),
),
]

with pytest.raises(ValueError):
MultiTrack(geometry=lines, tracks=[Track(track_items=track_items)])


class TestLxml(Lxml, TestStdLibrary):
"""Test with lxml."""
Expand Down

0 comments on commit 2c9ec4b

Please sign in to comment.