Skip to content

Commit

Permalink
fix ruff check
Browse files Browse the repository at this point in the history
  • Loading branch information
xoolive committed Sep 26, 2024
1 parent 0d4f832 commit 0bf9175
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions tests/test_aircraft.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest
from traffic.data import aircraft
from traffic.data.basic.aircraft import Aircraft

import pandas as pd
from traffic.data import aircraft
from traffic.data.basic.aircraft import Aircraft

aircraft.download_junzis() # make tests based on Junzi's (light) database

Expand Down
1 change: 1 addition & 0 deletions tests/test_airports.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import zipfile

import pytest

from traffic.data import airports, runways

skip_runways = False
Expand Down
1 change: 1 addition & 0 deletions tests/test_airspace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from traffic.core import Airspace
from traffic.data import eurofirs

Expand Down
1 change: 1 addition & 0 deletions tests/test_airways.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from traffic.data import airways, eurofirs


Expand Down
1 change: 1 addition & 0 deletions tests/test_clustering.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Any, cast

from cartes.crs import CH1903p # type: ignore

from traffic.core import Traffic
from traffic.data.samples import collections, get_sample

Expand Down
1 change: 1 addition & 0 deletions tests/test_cpa.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import cast

from cartes.crs import CH1903p # type: ignore

from traffic.core import Traffic
from traffic.data.samples import collections, get_sample

Expand Down
3 changes: 1 addition & 2 deletions tests/test_datasets.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import pandas as pd
from traffic.data.basic.navaid import Navaids
from traffic.data.datasets.scat import SCAT

import pandas as pd


def test_scat() -> None:
s = SCAT("scat20161015_20161021.zip", nflights=10)
Expand Down
1 change: 1 addition & 0 deletions tests/test_decode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path

import pytest

from traffic.core import Flight
from traffic.data.adsb.decode import RawData
from traffic.data.samples import sample_dump1090, switzerland
Expand Down
8 changes: 4 additions & 4 deletions tests/test_flight.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import httpx
import pytest
from cartes.osm import Overpass

import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal
from traffic.algorithms.douglas_peucker import douglas_peucker
from traffic.core import Flight, Traffic
from traffic.data import airports, eurofirs, navaids, runways
Expand All @@ -21,10 +25,6 @@
zurich_airport,
)

import numpy as np
import pandas as pd
from pandas.testing import assert_frame_equal

# This part only serves on travis when the downloaded file is corrupted
# This shouldn't happen much as caching is now activated.
skip_runways = False
Expand Down
3 changes: 1 addition & 2 deletions tests/test_flightplan.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import List, cast

import pandas as pd
from traffic.core.flightplan import (
Airway,
CoordinatePoint,
Expand All @@ -11,8 +12,6 @@
)
from traffic.data.basic.airways import Airways

import pandas as pd


class ExtraData(Airways):
name = "extra_for_test"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_generation.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import Any, Tuple, cast

from cartopy.crs import EuroPP
from traffic.core import Flight, Traffic
from traffic.data.samples import collections, get_sample

import numpy as np
import numpy.typing as npt
import pandas as pd
from traffic.core import Flight, Traffic
from traffic.data.samples import collections, get_sample


class NaiveGeneration:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_intervals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from traffic.core.intervals import Interval, IntervalCollection

import pandas as pd
from traffic.core.intervals import Interval, IntervalCollection

dates = pd.date_range("2022-03-21 11:10", "2022-03-21 11:20", freq="1T")
h0, h1, h2, h3, h4, h5, h6, h7, h8, *_ = dates
Expand Down
1 change: 1 addition & 0 deletions tests/test_persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Callable

import pytest

from traffic.core import Traffic
from traffic.data.samples import zurich_airport

Expand Down
1 change: 1 addition & 0 deletions tests/test_so6.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datetime import timedelta

import pytest

from traffic.data import eurofirs

notfound = False
Expand Down
3 changes: 1 addition & 2 deletions tests/test_traffic.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import pandas as pd
from traffic.core import Flight
from traffic.data import eurofirs
from traffic.data.samples import switzerland

import pandas as pd


def test_properties() -> None:
assert len(switzerland) == 1244
Expand Down

0 comments on commit 0bf9175

Please sign in to comment.