Skip to content

Conversation

@KelseyVDB
Copy link
Contributor

Removed carp model tab to check pre-commit and configured code and dependencies to work for it
Might have missed some dependencies or problems not affected by the tab change so someone should double check for any I missed
Had to use ignore for some typing problems for functions from an external library (get_logger and destroy_node from node) and make Ruff ignore those ignores
Might want to find better way to do above without it but I couldn't find one because can't edit node
Changed some types to properly fit constructor/function calls
May or may not close issue #4, want someone to check

Pull Request

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Related Tickets & Documents

  • Related Issue # 4
  • Closes #

Removed carp model tab to check pre-commit and configured code and dependencies to work for it
Might have missed some dependencies or problems not affected by the tab change so someone should double check for any I missed
Had to use ignore for some typing problems for functions from an external library (get_logger and destroy_node from node) and make Ruff ignore those ignores
    Might want to find better way to do above without it but I couldn't find one because can't edit node
Changed some types to properly fit constructor/function calls
@KelseyVDB KelseyVDB linked an issue Oct 9, 2025 that may be closed by this pull request
@KelseyVDB
Copy link
Contributor Author

mypy dependency for rclpy seems to be causing problems. That one wasn't necessary for the errors I was looking at after removing carp model tab but it looked like a dependency I should add and it worked with pre-commit-run. Might be able to remove it.

Added more ignores for get_logger and fixed typing problems for more cv2 class method calls
Ignores being flagged as unecessary for some reason despite being very much necessary when I do pre-commit run
Plan to look into more and extend fixes before next pull request
Committing to see if this makes the checks work
Committing to test if within pre-commit.ci limits now
Somehow also made some #type: ignore comments no longer needed from mypy pre-commit's view as well
Also added types-paramiko after removing the type ignore for it
Will hopefully fix pre-commit.ci checks
Also managed to no longer need the type: ignore comments using an argument that normal mypy already was using
Ignores no longer needed for mypy so ruff ignore to allow them no longer needed
Having anything (including '/dev/video0') as an argument for VideoCapture causes the mypy error 'Too many arguments'
Couldn't figure out why so removed it to get mypy to work but left the original in the comments
Still seems to work without any arguments but might just be because I'm not connected to the cameras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Experiment with Mypy pre-commit ci

3 participants