Skip to content

Add type hints to test_links.py (#532)#682

Merged
JoeZiminski merged 7 commits intoneuroinformatics-unit:mainfrom
AdityaGupta716:add-type-hints-tests-532
Feb 24, 2026
Merged

Add type hints to test_links.py (#532)#682
JoeZiminski merged 7 commits intoneuroinformatics-unit:mainfrom
AdityaGupta716:add-type-hints-tests-532

Conversation

@AdityaGupta716
Copy link
Contributor

Description

This PR adds type hints to test files, specifically addressing issue #532 "Extend type hints to tests".

What is this PR?

  • Addition of a new feature

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?

  • Add return type hint (-> None) to the test_links() function in tests/tests_unit/test_links.py
  • This is a focused, minimal change that shows the pattern for extending type hints to other test files

References

Closes #532

How has this PR been tested?

  • No functional changes to the test logic, only type hints added
  • The test continues to pass as expected

AdityaGupta716 and others added 5 commits February 7, 2026 12:51
…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.
Add module docstring for custom exceptions.
- 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
@JoeZiminski
Copy link
Member

Hi @AdityaGupta716 thanks for this, please see comment in #683

@AdityaGupta716
Copy link
Contributor Author

@JoeZiminski i am done with the changes

@JoeZiminski
Copy link
Member

Thanks @AdityaGupta716, can you also check out our custom types and cross-check the correct type is applied, for example Prefix type is for prefix rather than str.

@AdityaGupta716
Copy link
Contributor Author

AdityaGupta716 commented Feb 20, 2026

@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!

@JoeZiminski
Copy link
Member

Indeed it was, thanks @AdityaGupta716 !

@JoeZiminski
Copy link
Member

Will merge as test failures unrelated.

@JoeZiminski JoeZiminski merged commit d78a51f into neuroinformatics-unit:main Feb 24, 2026
9 of 15 checks passed
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.

Extend type hints to tests

2 participants