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

[MNT] Fixes linting issue B016 Cannot raise a literal in distances module #4284

Merged
merged 3 commits into from Mar 5, 2023

Conversation

SamiAlavi
Copy link
Contributor

@SamiAlavi SamiAlavi commented Mar 4, 2023

Reference Issues/PRs

#4182

What does this implement/fix? Explain your changes.

Fixed B016 Cannot raise a literal. Did you intend to return it or raise an Exception?

Does your contribution introduce a new dependency? If yes, which one?

No

What should a reviewer concentrate their feedback on?

  • sktime/distances/_ddtw.py:119:13: B016 Cannot raise a literal. Did you intend to return it or raise an Exception?
  • sktime/distances/_ddtw.py:221:13: B016 Cannot raise a literal. Did you intend to return it or raise an Exception?

Did you add any tests for the change?

No

Any other comments?

No

PR checklist

For all contributions
  • I've added myself to the list of contributors.
  • Optionally, I've updated sktime's CODEOWNERS to receive notifications about future changes to these files.
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG] indicating whether the PR topic is related to enhancement, maintenance, documentation, or bug.
For new estimators
  • I've added the estimator to the online documentation.
  • I've updated the existing example notebooks or provided a new one to showcase how my estimator works.

@SamiAlavi SamiAlavi requested a review from fkiraly as a code owner March 4, 2023 20:32
fkiraly
fkiraly previously approved these changes Mar 4, 2023
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Great, Thanks!

not a blocker, since this PR is an improvement, but changing this would be appreciated:

I would raise a TypeError (and not the very general Exception), since this exception seems to be about the type of the arg compute_derivative.

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Thanks!

@fkiraly fkiraly added the maintenance Continuous integration, unit testing & package distribution label Mar 4, 2023
@SamiAlavi
Copy link
Contributor Author

Hi @fkiraly, is it okay for this PR to get merged? I'm waiting so that I can easily create branches for the fixes in other modules too.

@fkiraly
Copy link
Collaborator

fkiraly commented Mar 5, 2023

yes, I was just waiting for the tests to pass.

@fkiraly fkiraly merged commit 2dde3cb into sktime:main Mar 5, 2023
@fkiraly fkiraly changed the title [ENH] Fix B016 Cannot raise a literal error in Distances module [MNT] Fixes linting issue B016 Cannot raise a literal in distances module Mar 5, 2023
@SamiAlavi SamiAlavi deleted the maintenance_sklearn_distances branch March 5, 2023 14:36
SamiAlavi added a commit to SamiAlavi/sktime that referenced this pull request Mar 9, 2023
…time#4284)

Towards sktime#4182 

Fixes linting issue `B016 Cannot raise a literal. Did you intend to return it or raise an Exception?` in `distances` module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Continuous integration, unit testing & package distribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants