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 shapely
|
||||
|
||||
from typing import Self
|
||||
from typing import Self, Optional
|
||||
|
||||
from xmet.db import Database, DatabaseTable, DatabaseOrder
|
||||
from xmet.coord import COORD_SYSTEM
|
||||
|
@ -97,7 +97,7 @@ class Sounding(DatabaseTable):
|
|||
@staticmethod
|
||||
def valid_by_station(db: Database,
|
||||
station: str,
|
||||
timestamp: datetime.datetime=None):
|
||||
timestamp: Optional[datetime.datetime]=None):
|
||||
sql = """
|
||||
select
|
||||
id, station, timestamp_observed, timestamp_released,
|
||||
|
@ -215,10 +215,10 @@ class SoundingParams():
|
|||
self.cape = None
|
||||
|
||||
@staticmethod
|
||||
def cape(temp_line: Series,
|
||||
def find_cape(temp_line: Series,
|
||||
moist_adiabat: Series,
|
||||
lfc: tuple[float],
|
||||
el: tuple[float]) -> float:
|
||||
lfc: tuple[float, float],
|
||||
el: tuple[float, float]) -> float:
|
||||
cape = 0.0
|
||||
|
||||
p_lfc, p_el = lfc[1], el[1]
|
||||
|
@ -275,7 +275,7 @@ class SoundingParams():
|
|||
self.lcl = lcl
|
||||
self.lfc = lfc
|
||||
self.el = el
|
||||
self.cape = SoundingParams.cape(virtual_temp_line,
|
||||
self.cape = SoundingParams.find_cape(virtual_temp_line,
|
||||
moist_adiabat,
|
||||
lfc,
|
||||
el)
|
||||
|
|
Loading…
Add table
Reference in a new issue