Skip to content

[mypy] Add/fix type annotations for stacks in data structures - #4362

Closed
abhinabamitra wants to merge 1 commit into
TheAlgorithms:masterfrom
abhinabamitra:mypy-fix
Closed

abhinabamitra wants to merge 1 commit into
TheAlgorithms:masterfrom
abhinabamitra:mypy-fix

Conversation

@abhinabamitra

Copy link
Copy Markdown

Describe your change:

  • 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}.

@ghost ghost added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Apr 26, 2021
@cclauss
cclauss requested a review from dhruvmanila April 28, 2021 05:32
@ghost ghost added the tests are failing Do not merge until tests pass label Apr 28, 2021

@dhruvmanila dhruvmanila left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey, @abhinabamitra thanks for doing this but there are a lot of functions in the stacks/ directory which are untyped. Our goal is to provide types for all the functions and variables (which mypy cannot infer).

You need to run a minimum of mypy . from the stacks/ directory and if possible mypy --strict ..

Also, the tests are failing so if you could take a look at why that is happening, it would be great. If you need any help, don't hesitate to ask :)

@ghost ghost added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Apr 28, 2021
@dhruvmanila dhruvmanila self-assigned this Apr 28, 2021
@stale

stale Bot commented Jun 2, 2021

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale Used to mark an issue or pull request stale. label Jun 2, 2021
@stale

stale Bot commented Jun 9, 2021

Copy link
Copy Markdown

Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!

@stale stale Bot closed this Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes A maintainer has requested changes to this PR enhancement This PR modified some existing files stale Used to mark an issue or pull request stale. tests are failing Do not merge until tests pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants