Fix Python linter issues
This commit is contained in:
parent
adf97b1cd2
commit
94c28ec374
1 changed files with 10 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
||||||
import datetime
|
import datetime
|
||||||
import shapely
|
import shapely
|
||||||
|
|
||||||
from typing import Self
|
from typing import Self, Optional
|
||||||
|
|
||||||
from xmet.db import Database, DatabaseTable, DatabaseOrder
|
from xmet.db import Database, DatabaseTable, DatabaseOrder
|
||||||
from xmet.coord import COORD_SYSTEM
|
from xmet.coord import COORD_SYSTEM
|
||||||
|
@ -97,7 +97,7 @@ class Sounding(DatabaseTable):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def valid_by_station(db: Database,
|
def valid_by_station(db: Database,
|
||||||
station: str,
|
station: str,
|
||||||
timestamp: datetime.datetime=None):
|
timestamp: Optional[datetime.datetime]=None):
|
||||||
sql = """
|
sql = """
|
||||||
select
|
select
|
||||||
id, station, timestamp_observed, timestamp_released,
|
id, station, timestamp_observed, timestamp_released,
|
||||||
|
@ -215,10 +215,10 @@ class SoundingParams():
|
||||||
self.cape = None
|
self.cape = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def cape(temp_line: Series,
|
def find_cape(temp_line: Series,
|
||||||
moist_adiabat: Series,
|
moist_adiabat: Series,
|
||||||
lfc: tuple[float],
|
lfc: tuple[float, float],
|
||||||
el: tuple[float]) -> float:
|
el: tuple[float, float]) -> float:
|
||||||
cape = 0.0
|
cape = 0.0
|
||||||
|
|
||||||
p_lfc, p_el = lfc[1], el[1]
|
p_lfc, p_el = lfc[1], el[1]
|
||||||
|
@ -275,10 +275,10 @@ class SoundingParams():
|
||||||
self.lcl = lcl
|
self.lcl = lcl
|
||||||
self.lfc = lfc
|
self.lfc = lfc
|
||||||
self.el = el
|
self.el = el
|
||||||
self.cape = SoundingParams.cape(virtual_temp_line,
|
self.cape = SoundingParams.find_cape(virtual_temp_line,
|
||||||
moist_adiabat,
|
moist_adiabat,
|
||||||
lfc,
|
lfc,
|
||||||
el)
|
el)
|
||||||
|
|
||||||
self.temp_line = temp_line
|
self.temp_line = temp_line
|
||||||
self.virtual_temp_line = virtual_temp_line
|
self.virtual_temp_line = virtual_temp_line
|
||||||
|
|
Loading…
Add table
Reference in a new issue