Skip to content

Commit 3332642

Browse files
committed
chore: correct mypy errors
1 parent d95eccf commit 3332642

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

redshift_connector/cursor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from redshift_connector.core import Connection
1818

1919
try:
20-
import numpy
21-
import pandas
20+
import numpy # type: ignore
21+
import pandas # type: ignore
2222
except:
2323
pass
2424

test/integration/test_pandas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def fin():
3131

3232
@pandas_only
3333
def test_fetch_dataframe(db_table):
34-
import numpy as np
35-
import pandas as pd
34+
import numpy as np # type: ignore
35+
import pandas as pd # type: ignore
3636

3737
df = pd.DataFrame(
3838
np.array(

test/unit/test_iam_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_set_iam_properties_enforce_min_ssl_mode(ssl_param):
123123

124124

125125
@pytest.mark.parametrize("_input", client_protocol_version_values)
126-
def test_set_iam_properties_enforce_min_ssl_mode(_input):
126+
def test_set_iam_properties_enforce_client_protocol_version(_input):
127127
keywords: typing.Dict = {"client_protocol_version": _input}
128128
all_params: typing.Dict = get_set_iam_properties_args(**keywords)
129129
assert all_params["client_protocol_version"] == _input

test/utils/decorators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def is_numpy_installed() -> bool:
55
try:
6-
import numpy
6+
import numpy # type: ignore
77

88
return True
99
except ModuleNotFoundError:
@@ -12,13 +12,13 @@ def is_numpy_installed() -> bool:
1212

1313
def is_pandas_installed() -> bool:
1414
try:
15-
import pandas
15+
import pandas # type: ignore
1616

1717
return True
1818
except ModuleNotFoundError:
1919
return False
2020

2121

22-
numpy_only: pytest.mark = pytest.mark.skipif(not is_numpy_installed(), reason="requires numpy")
22+
numpy_only = pytest.mark.skipif(not is_numpy_installed(), reason="requires numpy")
2323

24-
pandas_only: pytest.mark = pytest.mark.skipif(not is_pandas_installed(), reason="requires pandas")
24+
pandas_only = pytest.mark.skipif(not is_pandas_installed(), reason="requires pandas")

0 commit comments

Comments
 (0)