Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[augmentation] fix type hints for Output of Transform.forward #551

Merged
merged 6 commits into from
Oct 18, 2023

Conversation

tgy
Copy link
Contributor

@tgy tgy commented Oct 16, 2023

  • fix Output type annotation, now reflecting that it can return y as a
    tuple of torch.Tensor
  • define new Operation type hint, to annotate the Transform.operation
    attribute, to better check operation return types
  • define Batch, Output and Operation as type aliases

@tgy
Copy link
Contributor Author

tgy commented Oct 17, 2023

seems that TypeAlias was not supported before Python 3.10, removed it

fixed the trailing whitespaces as well (flake8 should now pass, although we should switch to ruff - yes, saw the other PR)

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #551 (d0539c4) into master (a5a2b04) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #551   +/-   ##
=======================================
  Coverage   83.73%   83.74%           
=======================================
  Files          63       63           
  Lines        4821     4822    +1     
=======================================
+ Hits         4037     4038    +1     
  Misses        784      784           

@tgy
Copy link
Contributor Author

tgy commented Oct 18, 2023

@bruAristimunha any idea why the Windows test are failing? seems it's failing why before running tests, during a pip install that fails

EDIT: i've tried to fix it in the workflow file. If you can re-run the CI build to check

@bruAristimunha
Copy link
Collaborator

Okay. Thank you @tgy for fixing the CI for the window. All good for me =)

@bruAristimunha bruAristimunha merged commit 91bfb4c into braindecode:master Oct 18, 2023
15 checks passed
@bruAristimunha
Copy link
Collaborator

Thank you for fix type @tgy

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.

None yet

2 participants