Fixes unused variable errors in LGTM (#1746)

* Fixes unsed variable errors in LGTM

* Fixes integer check

* Fixes failing tests
This commit is contained in:
onlinejudge95
2020-02-11 13:59:09 +05:30
committed by GitHub
parent fde31c93a3
commit 7b7c1a0135
6 changed files with 25 additions and 39 deletions

View File

@ -111,12 +111,9 @@ def inverse(matrix):
def _check_not_integer(matrix):
try:
rows = len(matrix)
cols = len(matrix[0])
if not isinstance(matrix, int) and not isinstance(matrix[0], int):
return True
except TypeError:
raise TypeError("Cannot input an integer value, it must be a matrix")
raise TypeError("Expected a matrix, got int/list instead")
def _shape(matrix):