Add type hints to test_links.py (#532)#682
Merged
JoeZiminski merged 7 commits intoneuroinformatics-unit:mainfrom Feb 24, 2026
Merged
Add type hints to test_links.py (#532)#682JoeZiminski merged 7 commits intoneuroinformatics-unit:mainfrom
JoeZiminski merged 7 commits intoneuroinformatics-unit:mainfrom
Conversation
…euroinformatics-unit#617) Updated keyboard shortcut tooltips in tooltips.py to emphasize CTRL+C (with SHIFT) instead of CTRL+Q for copying filepath to clipboard. CTRL+Q quits the application on macOS, so CTRL+C is the more appropriate shortcut for users on that platform.
for more information, see https://pre-commit.ci
Add module docstring for custom exceptions.
for more information, see https://pre-commit.ci
- Add return type hint (-> None) to test_links() function - This is part of the effort to extend type hints to test files as described in issue neuroinformatics-unit#532
1 task
Member
|
Hi @AdityaGupta716 thanks for this, please see comment in #683 |
Contributor
Author
|
@JoeZiminski i am done with the changes |
Member
|
Thanks @AdityaGupta716, can you also check out our custom types and cross-check the correct type is applied, for example |
Contributor
Author
|
@JoeZiminski test_links.py has no parameters so there's no Prefix type to apply here — I believe this comment may have been intended for #683 where I've already updated all prefix: str to prefix: Prefix. Let me know if I've missed anything! |
Member
|
Indeed it was, thanks @AdityaGupta716 ! |
JoeZiminski
approved these changes
Feb 24, 2026
Member
|
Will merge as test failures unrelated. |
d78a51f
into
neuroinformatics-unit:main
9 of 15 checks passed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds type hints to test files, specifically addressing issue #532 "Extend type hints to tests".
What is this PR?
Why is this PR needed?
Currently, type hints are not added to tests to avoid maintenance burden. However, type hints can improve code readability and catch potential bugs. This PR demonstrates adding type hints to test functions as a first step.
What does this PR do?
test_links()function intests/tests_unit/test_links.pyReferences
Closes #532
How has this PR been tested?