You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__________________________________________ MyPyDataFrameTest.test_mypy_knows_of_dataframe_methods __________________________________________self = <tests.pandas_.test_mypy_dataframe.MyPyDataFrameTest testMethod=test_mypy_knows_of_dataframe_methods> @skipUnless(7 < sys.version_info.minor, "MyPy does not work with DataFrame on 3.7") def test_mypy_knows_of_dataframe_methods(self): # If MyPy knows of some arbitrary DataFrame methods, we can assume that # code completion works. exit_code, stdout, stderr = check_mypy_on_code( """ from typing import Any from nptyping import DataFrame df: DataFrame[Any] df.shape df.dtypes df.values df.boxplot df.filter """ )
> self.assertEqual(0, exit_code, stdout)E AssertionError: 0 != 1 : nptyping/typing_.pyi:50: error: Name "np.bool8" is not defined [name-defined]E nptyping/typing_.pyi:52: error: Name "np.object0" is not defined [name-defined]E nptyping/typing_.pyi:64: error: Name "np.int0" is not defined [name-defined]E nptyping/typing_.pyi:77: error: Name "np.uint0" is not defined [name-defined]E nptyping/typing_.pyi:104: error: Name "np.void0" is not defined [name-defined]E nptyping/typing_.pyi:109: error: Name "np.bytes0" is not defined [name-defined]E nptyping/typing_.pyi:111: error: Name "np.str0" is not defined [name-defined]E /var/tmp/portage/dev-python/nptyping-2.5.0/temp/tmp40dzg4lh/test_file.py:5: error: "DataFrame" expects no type arguments, but 1 given [type-arg]E Found 8 errors in 2 files (checked 1 source file)exit_code = 1self = <tests.pandas_.test_mypy_dataframe.MyPyDataFrameTest testMethod=test_mypy_knows_of_dataframe_methods>stderr = ''stdout = ('nptyping/typing_.pyi:50: error: Name "np.bool8" is not defined ' '[name-defined]\n' 'nptyping/typing_.pyi:52: error: Name "np.object0" is not defined ' '[name-defined]\n' 'nptyping/typing_.pyi:64: error: Name "np.int0" is not defined ' '[name-defined]\n' 'nptyping/typing_.pyi:77: error: Name "np.uint0" is not defined ' '[name-defined]\n' 'nptyping/typing_.pyi:104: error: Name "np.void0" is not defined ' '[name-defined]\n' 'nptyping/typing_.pyi:109: error: Name "np.bytes0" is not defined ' '[name-defined]\n' 'nptyping/typing_.pyi:111: error: Name "np.str0" is not defined ' '[name-defined]\n' '/var/tmp/portage/dev-python/nptyping-2.5.0/temp/tmp40dzg4lh/test_file.py:5: ' 'error: "DataFrame" expects no type arguments, but 1 given [type-arg]\n' 'Found 8 errors in 2 files (checked 1 source file)\n')tests/pandas_/test_mypy_dataframe.py:61: AssertionError
Any ideas what's wrong here?
Is it a question of np.bool8 being deprecated in favour of np.bool_?
Is it a question of np.bool8 being deprecated in favour of np.bool_
From what I can gather, numpy's dtype needs something not built-in internally, so that's what np.bool_ is for. From a user's point of view, I think we're supposed to be just using bool.
Full build log: https://ppb.chymera.eu/2facbc.log
Example excerpt of failure:
Any ideas what's wrong here?
Is it a question of
np.bool8
being deprecated in favour ofnp.bool_
?Apparently the package already uses both 🤔:
The text was updated successfully, but these errors were encountered: