mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore: Update pylint to 2.17.4 (#24700)
Co-authored-by: John Bodley <john.bodley@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import logging
|
||||
import re
|
||||
import urllib.request
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Optional, Union
|
||||
from urllib.error import URLError
|
||||
|
||||
import numpy as np
|
||||
@@ -65,7 +65,8 @@ def escape_value(value: str) -> str:
|
||||
|
||||
|
||||
def df_to_escaped_csv(df: pd.DataFrame, **kwargs: Any) -> Any:
|
||||
escape_values = lambda v: escape_value(v) if isinstance(v, str) else v
|
||||
def escape_values(v: Any) -> Union[str, Any]:
|
||||
return escape_value(v) if isinstance(v, str) else v
|
||||
|
||||
# Escape csv headers
|
||||
df = df.rename(columns=escape_values)
|
||||
|
||||
Reference in New Issue
Block a user