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

Add mypy and flake static checkers and remove .travis.yml file #15

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

SagiPolaczek
Copy link
Contributor

@SagiPolaczek SagiPolaczek commented Nov 6, 2024

All tests passed locally

== 13 passed, 3 xpassed, 27 warnings in 787.55s (0:13:07) ==

Comment on lines -24 to +27
optimizer=optimizer, num_warmup_steps=0, timescale=1, last_epoch=last_epoch
optimizer=optimizer,
num_warmup_steps=0,
timescale=timescale,
last_epoch=last_epoch,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change in logic (timescale wasn't in use)

assert (
pred.shape == target.shape
), f"shape does not match {pred.shape=} <> {target.shape=}"
assert pred.shape == target.shape, f"shape does not match {pred.shape=} <> {target.shape=}" # type: ignore[attr-defined]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason mypy doesn't get it that pred and target are ndarrays:

mammal/metrics.py:63: error: "list[Any]" has no attribute "shape"  [attr-defined]
mammal/metrics.py:64: error: "list[Any]" has no attribute "shape"  [attr-defined]

Copy link
Contributor

@mosheraboh mosheraboh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mosheraboh mosheraboh merged commit 29021ac into main Nov 7, 2024
2 checks passed
@mosheraboh mosheraboh deleted the sagi/rm_travis_add_mypy branch November 7, 2024 12:44
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