Skip to content

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

Merged
bruAristimunha merged 6 commits into
braindecode:masterfrom
choucavalier:master
Oct 18, 2023
Merged

bruAristimunha merged 6 commits into
braindecode:masterfrom
choucavalier:master

Conversation

@choucavalier

Copy link
Copy Markdown
Contributor
  • 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

@choucavalier

Copy link
Copy Markdown
Contributor Author

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

codecov Bot commented Oct 17, 2023 •

Copy link
Copy Markdown

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           

@choucavalier

choucavalier commented Oct 18, 2023 •

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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
@bruAristimunha

Copy link
Copy Markdown
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.

2 participants