pymodbus icon indicating copy to clipboard operation
pymodbus copied to clipboard

Fix remaining mypy errors in test_transaction.py

Open jameshilliard opened this issue 1 year ago • 5 comments

Initialize class attributes to desired values instead of None.

Use mock.patch for test_execute client.framer methods.

Use mock.create_autospec for mocking the modbus clients.

jameshilliard avatar Jul 21 '24 22:07 jameshilliard

Ps. pleasing mypy is NOT a reason! nor is having strongly typing in tests.

janiversen avatar Jul 22 '24 07:07 janiversen

Ps. pleasing mypy is NOT a reason! nor is having strongly typing in tests.

Came up with another approach that works on both mypy and pylint that gets rid of the type hints.

jameshilliard avatar Jul 22 '24 07:07 jameshilliard

Easy, do NOT use mypy ! pylint works.

It is NOT an objective for this project to have mypy run cleanly on test (pylint already runs cleanly).

This constant flow of PRs, targeting the same file and with only cosmetic changes, are taking a lot of my time. I need to do a in depth review, because there are often changes that change the tests, which clearly is unwanted.

janiversen avatar Jul 22 '24 08:07 janiversen

And please stop force pushing every commit, push the last one before requesting a review, you are using our CPU minutes, causing important runs to be delayed.

janiversen avatar Jul 22 '24 08:07 janiversen

And please stop force pushing every commit, push the last one before requesting a review, you are using our CPU minutes, causing important runs to be delayed.

Actually yeah, @jameshilliard it should be straightforward to run the CI on a fork, I don't think anything needs credentials.

alexrudd2 avatar Jul 23 '24 04:07 alexrudd2

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Sep 07 '24 02:09 github-actions[bot]

This PR was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Sep 18 '24 02:09 github-actions[bot]