Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flake8 errors #13

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions osos/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,10 +2303,10 @@ def atan2(
Row(ATAN2(1, 2)=0.46364...)
"""
if isinstance(col1, str):
col = AbstractCol(col)
col1 = AbstractCol(col1)

if isinstance(col1, str):
col = AbstractCol(col)
if isinstance(col2, str):
col2 = AbstractCol(col2)

return Func(atan2_func, col1, col2)

Expand Down Expand Up @@ -2381,10 +2381,10 @@ def pow(
Row(POWER(3, 2)=9.0)
"""
if isinstance(col1, str):
col = AbstractCol(col)
col1 = AbstractCol(col1)

if isinstance(col1, str):
col = AbstractCol(col)
col2 = AbstractCol(col2)

return Func(pow_func, col1, col2)

Expand Down Expand Up @@ -2439,10 +2439,10 @@ def pmod(
"""
col1, col2 = dividend, divisor
if isinstance(col1, str):
col = AbstractCol(col)
col1 = AbstractCol(col1)

if isinstance(col1, str):
col = AbstractCol(col)
col2 = AbstractCol(col2)

return Func(pmod_func, col1, col2)

Expand All @@ -2452,10 +2452,6 @@ def row_number() -> Func:
"""
Window function: returns a sequential number starting at 1 within a window partition.






Returns
-------
Expand Down Expand Up @@ -2798,9 +2794,9 @@ def corr(col1: "AbstractColOrName", col2: "AbstractColOrName") -> Func:
[Row(c=1.0)]
"""
if isinstance(col1, str):
col = AbstractCol(col)
col1 = AbstractCol(col1)
if isinstance(col2, str):
col = AbstractCol(col)
col2 = AbstractCol(col2)
return Func(corr_func, col1, col2)


Expand Down Expand Up @@ -2831,9 +2827,9 @@ def covar_pop(col1: "AbstractColOrName", col2: "AbstractColOrName") -> Func:
[Row(c=0.0)]
"""
if isinstance(col1, str):
col = AbstractCol(col)
col1 = AbstractCol(col1)
if isinstance(col2, str):
col = AbstractCol(col)
col2 = AbstractCol(col2)
return Func(covar_pop_func, col1, col2)


Expand Down Expand Up @@ -2868,9 +2864,9 @@ def covar_samp(col1: "AbstractColOrName", col2: "AbstractColOrName") -> Func:
[Row(c=0.0)]
"""
if isinstance(col1, str):
col = AbstractCol(col)
col1 = AbstractCol(col1)
if isinstance(col2, str):
col = AbstractCol(col)
col2 = AbstractCol(col2)
return Func(covar_samp_func, col1, col2)


Expand Down
Loading