forked from HiroIshida/detic_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use mypy for static type checking (HiroIshida#30)
* Add mypy.ini * Fix type annotation misstake by recent update * Ignore type annotation miss * Add mypy test in ci
- Loading branch information
1 parent
a897aff
commit ddb047a
Showing
4 changed files
with
77 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Peripheral test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
peripheral: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: pip install formatters and mypy | ||
run: | | ||
pip3 install mypy | ||
- name: check by mypy | ||
run: | | ||
pip3 install -r requirements.txt | ||
pip3 install numpy==1.23 # to enable numpy's type checking | ||
mypy --version | ||
mypy . |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[mypy] | ||
python_version = 3.8 | ||
exclude = Detic | ||
show_error_codes = True | ||
warn_unused_ignores = False | ||
check_untyped_defs = True | ||
|
||
[mypy-cv_bridge] | ||
ignore_missing_imports = True | ||
[mypy-rospy] | ||
ignore_missing_imports = True | ||
[mypy-rostest] | ||
ignore_missing_imports = True | ||
[mypy-rospkg] | ||
ignore_missing_imports = True | ||
[mypy-rosbag] | ||
ignore_missing_imports = True | ||
[mypy-message_filters] | ||
ignore_missing_imports = True | ||
[mypy-detectron2.*] | ||
ignore_missing_imports = True | ||
[mypy-detic.*] | ||
ignore_missing_imports = True | ||
[mypy-centernet.config] | ||
ignore_missing_imports = True | ||
[mypy-detic_ros.*] | ||
ignore_missing_imports = True | ||
[mypy-sensor_msgs.*] | ||
ignore_missing_imports = True | ||
[mypy-std_msgs.*] | ||
ignore_missing_imports = True | ||
[mypy-jsk_recognition_msgs.*] | ||
ignore_missing_imports = True | ||
[mypy-cv2] | ||
ignore_missing_imports = True | ||
[mypy-matplotlib.*] | ||
ignore_missing_imports = True | ||
[mypy-tqdm] | ||
ignore_missing_imports = True | ||
[mypy-moviepy.*] | ||
ignore_missing_imports = True |
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