On the main branch, make lint currently errors out on pyright step.
Steps to reproduce
Replace this text with a code snippet or minimal working example to replicate your problem.
Run make lint
Include a description of your setup including:
Python version: 3.11.5
OS version and name: {'system': 'Darwin', 'node': 'charles-macbook.lan', 'release': '22.6.0', 'version': 'Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000', 'machine': 'arm64', 'processor': 'arm'}
Expected results
make lint succeeds.
Actual results
❯ make lint
poetry run black .
All done! ✨ 🍰 ✨
73 files left unchanged.
poetry run isort .
Skipped 1 files
poetry run flake8 .
poetry run pyright
/Users/charles/Development/nds/src/neural_data_simulator/ephys_generator.py
/Users/charles/Development/nds/src/neural_data_simulator/ephys_generator.py:233:41 - error: Argument of type "float" cannot be assigned to parameter "fmin" of type "int" in function "powerlaw_psd_gaussian"
"float" is incompatible with "int" (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/neural_data_simulator/filters.py
/Users/charles/Development/nds/src/neural_data_simulator/filters.py:67:36 - error: "gaussian" is not a known member of module "scipy.signal" (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/neural_data_simulator/inputs.py
/Users/charles/Development/nds/src/neural_data_simulator/inputs.py:163:46 - error: Dataclass __post_init__ method parameter type mismatch for field "lsl_stream_info"
Type "stream_info | None" cannot be assigned to type "stream_info"
Type "None" cannot be assigned to type "stream_info" (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/neural_data_simulator/inputs.py:223:16 - error: Argument of type "list[StreamInfo] | None" cannot be assigned to parameter "__obj" of type "Sized" in function "len"
Type "list[StreamInfo] | None" cannot be assigned to type "Sized"
"__len__" is not present (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/neural_data_simulator/inputs.py:224:31 - error: Object of type "None" is not subscriptable (reportOptionalSubscript)
/Users/charles/Development/nds/src/neural_data_simulator/outputs.py
/Users/charles/Development/nds/src/neural_data_simulator/outputs.py:67:42 - error: Index 1 is out of range for type _Shape (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/neural_data_simulator/outputs.py:427:28 - error: Argument of type "str" cannot be assigned to parameter "channel_format" of type "int" in function "__init__"
"str" is incompatible with "int" (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/tasks/center_out_reach/metrics.py
/Users/charles/Development/nds/src/tasks/center_out_reach/metrics.py:273:13 - error: Argument of type "float | Unknown | NDArray[float64] | floating[Any]" cannot be assigned to parameter "r2" of type "ndarray[Unknown, Unknown]" in function "_plot_velocities"
Type "float | Unknown | NDArray[float64] | floating[Any]" cannot be assigned to type "ndarray[Unknown, Unknown]"
"float" is incompatible with "ndarray[Unknown, Unknown]" (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/tasks/center_out_reach/metrics.py:282:13 - error: Argument of type "float | Unknown | NDArray[float64] | floating[Any]" cannot be assigned to parameter "r2" of type "ndarray[Unknown, Unknown]" in function "_plot_velocities"
Type "float | Unknown | NDArray[float64] | floating[Any]" cannot be assigned to type "ndarray[Unknown, Unknown]"
"float" is incompatible with "ndarray[Unknown, Unknown]" (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/tasks/center_out_reach/scalers.py
/Users/charles/Development/nds/src/tasks/center_out_reach/scalers.py:114:58 - error: Argument of type "Unknown | NDArray[float64] | Any | NDArray[Unknown] | tuple[Unknown, Unknown | NDArray[float64] | Any | NDArray[Unknown]]" cannot be assigned to parameter "X" of type "ndarray[Unknown, Unknown]" in function "pixels_to_millimeters"
Type "Unknown | NDArray[float64] | Any | NDArray[Unknown] | tuple[Unknown, Unknown | NDArray[float64] | Any | NDArray[Unknown]]" cannot be assigned to type "ndarray[Unknown, Unknown]"
"tuple[Unknown, Unknown | NDArray[float64] | Any | NDArray[Unknown]]" is incompatible with "ndarray[Unknown, Unknown]" (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/tasks/center_out_reach/screen_info.py
/Users/charles/Development/nds/src/tasks/center_out_reach/screen_info.py:24:24 - error: "NSDeviceSize" is unknown import symbol (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/tasks/center_out_reach/screen_info.py:25:24 - error: "NSScreen" is unknown import symbol (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/tasks/center_out_reach/screen_info.py:26:24 - error: "CGDisplayScreenSize" is unknown import symbol (reportGeneralTypeIssues)
/Users/charles/Development/nds/src/tasks/center_out_reach/task_window.py
/Users/charles/Development/nds/src/tasks/center_out_reach/task_window.py:255:32 - error: Cannot assign member "position" for type "Sprite"
"tuple[Unknown, ...]" is incompatible with "Tuple[int, int]"
Tuple size mismatch; expected 2 but received indeterminate (reportGeneralTypeIssues)
14 errors, 0 warnings, 0 informations
make: *** [lint] Error 1
Describe the bug
On the
main
branch,make lint
currently errors out onpyright
step.Steps to reproduce
Replace this text with a code snippet or minimal working example to replicate your problem.
Run
make lint
Include a description of your setup including:
3.11.5
{'system': 'Darwin', 'node': 'charles-macbook.lan', 'release': '22.6.0', 'version': 'Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000', 'machine': 'arm64', 'processor': 'arm'}
Expected results
make lint
succeeds.Actual results