-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CONTRIBUTING.md: Add info on running linters and simplify mypy invoca…
…tion (#612) * CONTRIBUTING.md: Add info on running linters * pyproject.toml: Specify mypy files to check * handwritten: Fix tzinfo type hints tests\unit\test_lib_time.py:109: error: Argument "tzinfo" to "to_datetime" of "AbsoluteTime" has incompatible type "ZoneInfo"; expected "Optional[timezone]" [arg-type] tests\unit\test_grpc_time.py:132: error: Argument "tzinfo" to "convert_timestamp_to_time" has incompatible type "ZoneInfo"; expected "Optional[timezone]" [arg-type] * tests: Fix type hints and a mypy-identified test bug tests\component\test_watchdog.py:10: error: "Task" not callable [operator] tests\component\test_watchdog.py:41: error: "Task" not callable [operator] tests\component\test_watchdog.py:67: error: "Task" not callable [operator] tests\component\test_interpreter.py:45: error: Invalid index type "int" for "dict[DAQmxErrors, str]"; expected type "DAQmxErrors" [index] tests\component\task\test_in_stream_read_properties.py:139: error: Incompatible types in assignment (expression has type "str", variable has type "Optional[Path]") [assignment] tests\component\task\test_in_stream_read_properties.py:159: error: Incompatible types in assignment (expression has type "str", variable has type "Optional[Path]") [assignment] tests\component\task\channels\test_channel_properties.py:216: error: "Scale" has no attribute "load" [attr-defined] tests\acceptance\test_multi_threading.py:126: error: Argument 4 to "submit" of "Executor" has incompatible type "Task"; expected "AIChannel" [arg-type] tests\acceptance\test_multi_threading.py:135: error: Argument 4 to "submit" of "Executor" has incompatible type "Task"; expected "AIChannel" [arg-type] tests\acceptance\test_internationalization.py:69: error: Incompatible types in assignment (expression has type "str", variable has type "Optional[Path]") [assignment] tests\unit\test_task_events.py:40: error: Argument 3 to "register_event_handlers" has incompatible type "type[_TaskEventType]"; expected "Sequence[_TaskEventType]" [arg-type] tests\unit\test_task_events.py:56: error: Argument 3 to "register_event_handlers" has incompatible type "type[_TaskEventType]"; expected "Sequence[_TaskEventType]" [arg-type] tests\unit\test_task_events.py:71: error: Argument 3 to "register_event_handlers" has incompatible type "type[_TaskEventType]"; expected "Sequence[_TaskEventType]" [arg-type] tests\unit\test_task.py:46: error: "Callable[[Optional[GrpcSessionOptions], Optional[BaseInterpreter]], BaseInterpreter]" has no attribute "mock" [attr-defined] * CONTRIBUTING.md: Simplify mypy invocation * GitHub: Simplify mypy invocation * tests: Remove an unused import * pyproject.toml: Point mypy to the parent of the nidaqmx package, not inside the package itself * tests: Add imports that mypy --platform complains about * tests: Fix Python 3.8 error
- Loading branch information
Showing
32 changed files
with
72 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import pytest | ||
|
||
import nidaqmx | ||
import nidaqmx.system | ||
from nidaqmx.system.storage import PersistedChannel | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
import pytest | ||
|
||
import nidaqmx | ||
import nidaqmx.system | ||
|
||
|
||
@pytest.fixture(params=[1, 2]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
import pytest | ||
|
||
import nidaqmx | ||
import nidaqmx.system | ||
from nidaqmx.constants import AcquisitionType | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.