fix(frontend-python): resolve pcc issues

This commit is contained in:
Umut
2023-06-23 10:15:33 +02:00
parent a3ae3ed86c
commit 21474cc75d
5 changed files with 8 additions and 7 deletions

View File

@@ -445,7 +445,8 @@ disable=raw-checker-failed,
too-many-statements,
unnecessary-lambda-assignment,
use-implicit-booleaness-not-comparison,
wrong-import-order
wrong-import-order,
unsubscriptable-object
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option

View File

@@ -288,7 +288,7 @@ class Tracer:
np.reshape,
np.right_shift,
np.rint,
np.round_,
np.round,
np.sign,
np.signbit,
np.sin,
@@ -327,7 +327,7 @@ class Tracer:
np.reshape: {
"newshape",
},
np.round_: {
np.round: {
"decimals",
},
np.squeeze: {

View File

@@ -370,9 +370,9 @@ def test_bad_maxpool_special(helpers):
helpers.check_str(
# pylint: disable=line-too-long
"""
f"""
Expected input elements to be of type np.integer, np.floating, or np.bool_ but it's dtype[object_]
Expected input elements to be of type np.integer, np.floating, or np.bool_ but it's {type(np.array([{}, None]).dtype).__name__}
""".strip(), # noqa: E501
# pylint: enable=line-too-long

View File

@@ -46,7 +46,7 @@ def test_plain_round_bit_pattern(sample, lsbs_to_remove, expected_output):
np.array([3.2, 4.1]),
3,
TypeError,
"Expected input elements to be integers but they are dtype[float64]",
f"Expected input elements to be integers but they are {type(np.array([3.2, 4.1]).dtype).__name__}", # noqa: E501
),
(
"foo",

View File

@@ -99,7 +99,7 @@ def test_node_bad_constant(constant, expected_error, expected_message):
[],
ValueError,
"Evaluation of generic 'unknown' node resulted in array(['abc', 'def'], dtype='<U3') "
"of type np.ndarray and of underlying type 'dtype[str_]' "
f"of type np.ndarray and of underlying type '{type(np.array(['abc', 'def']).dtype).__name__}' " # noqa: E501
"which is not acceptable because of the underlying type",
),
pytest.param(