Skip to content

Mypy fix rotation.py #4319

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

Merged
merged 9 commits into from
Apr 6, 2021
Merged

Conversation

algobytewise
Copy link
Contributor

Describe your change:

Related Issue: #4052

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

This reverts commit c2d04ae.
@ghost ghost added the awaiting reviews This PR is ready to be reviewed label Apr 6, 2021
@algobytewise
Copy link
Contributor Author

I reverted the changes to build.yml since this file being changed by another pull request, leading to a merge conflict.

@@ -1,11 +1,12 @@
import cv2
import numpy as np
from matplotlib import pyplot as plt
import os.path
Copy link
Member

Choose a reason for hiding this comment

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

Please use https://docs.python.org/3/library/pathlib.html instead of os.path for improved readability.

Copy link
Member

@cclauss cclauss Apr 6, 2021

Choose a reason for hiding this comment

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

from pathlib import Path

Path(__file__).resolve().parent / "image_data" / "lena.jpg"

@dhruvmanila
Copy link
Member

dhruvmanila commented Apr 6, 2021

Please rebase onto the latest master and remove the directory from mypy.ini

$ git remote add upstream https://github.com/TheAlgorithms/Python
$ git fetch upstream master
$ git merge upstream/master
$ git rebase master mypy-fix-rotation.py

algobytewise and others added 3 commits April 6, 2021 18:07
* feat: Add mypy config file

* refactor: Remove mypy options from build workflow

* Remove linear_algebra

Co-authored-by: Christian Clauss <[email protected]>
@ghost ghost added the merge conflicts Open a new PR or rebase on the latest commit label Apr 6, 2021
@ghost ghost added tests are failing Do not merge until tests pass and removed merge conflicts Open a new PR or rebase on the latest commit labels Apr 6, 2021
Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Makin' mypy progress...

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Apr 6, 2021
@cclauss cclauss merged commit 531d2d6 into TheAlgorithms:master Apr 6, 2021
Panquesito7 pushed a commit to Panquesito7/Python that referenced this pull request May 13, 2021
* fix type-hints arguments

* fix matrices & image-path

* Update build.yml

* Revert "Update build.yml"

This reverts commit c2d04ae.

* use pathlib

* feat: Add mypy configuration file (TheAlgorithms#4315)

* feat: Add mypy config file

* refactor: Remove mypy options from build workflow

* Remove linear_algebra

Co-authored-by: Christian Clauss <[email protected]>

* rebase & update mypy.ini

* fix pre-commit errors

Co-authored-by: Dhruv Manilawala <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
shermanhui pushed a commit to shermanhui/Python that referenced this pull request Oct 22, 2021
* fix type-hints arguments

* fix matrices & image-path

* Update build.yml

* Revert "Update build.yml"

This reverts commit c2d04ae.

* use pathlib

* feat: Add mypy configuration file (TheAlgorithms#4315)

* feat: Add mypy config file

* refactor: Remove mypy options from build workflow

* Remove linear_algebra

Co-authored-by: Christian Clauss <[email protected]>

* rebase & update mypy.ini

* fix pre-commit errors

Co-authored-by: Dhruv Manilawala <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants