Skip to content

Commit

Permalink
resolved issues raised by pyright 1.1.336
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaasRostock committed Nov 20, 2023
1 parent 172b721 commit 5078eaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/dictIO/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def to_string(
dict.data = sorted_data

# Create the string representation of the dictionary in its basic structure.
s += self.format_dict(dict.data)
s += self.format_dict(dict.data) # type: ignore

# The following elements a CppDict's .data attribute
# are usually still substituted by placeholders:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_dictReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,21 +248,21 @@ def test_eval_expressions_with_included_numpy_expressions():
dict_out = dict.data
assert dict_out["keysContainingNumpyExpressions"]["npKeyA"] == 2

assert_array_equal(dict_out["keysContainingNumpyExpressions"]["npKeyB"], [[1, 1], [1, 1]])
assert_array_equal(dict_out["keysContainingNumpyExpressions"]["npKeyB"], [[1, 1], [1, 1]]) # type: ignore

assert_array_equal(dict_out["keysContainingNumpyExpressions"]["npKeyC"], [2, 2, 2])

assert_array_equal(
dict_out["keysContainingNumpyExpressions"]["npKeyD"],
[[2, 0, 0], [0, 2, 0], [0, 0, 2]],
[[2, 0, 0], [0, 2, 0], [0, 0, 2]], # type: ignore
)

assert_array_equal(
dict_out["keysContainingNumpyExpressions"]["npKeyE"],
[[2, 0, 0], [0, 2, 0], [0, 0, 2]],
[[2, 0, 0], [0, 2, 0], [0, 0, 2]], # type: ignore
)

assert_array_equal(dict_out["keysContainingNumpyExpressions"]["npKeyZ"], [[0, 0, 0, 0]])
assert_array_equal(dict_out["keysContainingNumpyExpressions"]["npKeyZ"], [[0, 0, 0, 0]]) # type: ignore


def test_reread_string_literals():
Expand Down

0 comments on commit 5078eaa

Please sign in to comment.