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

Fix mypy in #2684 #3987

Merged
merged 2 commits into from
Nov 29, 2020
Merged

Fix mypy in #2684 #3987

merged 2 commits into from
Nov 29, 2020

Conversation

poyea
Copy link
Member

@poyea poyea commented Nov 29, 2020

Describe your change:

Fix mypy errors made in #2684.

  • 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 the awaiting reviews This PR is ready to be reviewed label Nov 29, 2020
@ghost
Copy link

ghost commented Nov 29, 2020

Pull Request Report

@poyea Hello! I'm a bot made to check all the pull request Python files. First of all, I want to say thank you for your time and interest in this project and for opening a pull request. There seems to be missing requirements in some of the Python files submitted in this pull request. Please read through the report and make the necessary changes. You can take a look at the relevant links provided after the report.

What are node paths? 🔽

The report contains headings and a checklist where the items are paths to the class/function/parameter where the requirement is missing. Node paths are double colon :: separated names and can be in any of the following format:

  • Class path: [file_name]::[class_name]
  • Function path: [file_name]::[function_name]
  • Function parameter path: [file_name]::[function_name]::[parameter_name]
  • Method path: [file_name]::[class_name]::[function_name]
  • Method parameter path: [file_name]::[class_name]::[function_name]::[parameter_name]

Following functions require tests [doctest/unittest/pytest]:

  • backtracking/all_combinations.py::create_all_state
  • backtracking/all_combinations.py::print_all_state
  • backtracking/all_permutations.py::generate_all_permutations
  • backtracking/all_permutations.py::create_state_space_tree
  • backtracking/n_queens.py::isSafe
  • backtracking/n_queens.py::solve
  • backtracking/n_queens.py::printboard
  • backtracking/rat_in_maze.py::run_maze
  • backtracking/sum_of_subsets.py::generate_sum_of_subsets_soln
  • backtracking/sum_of_subsets.py::create_state_space_tree

Following class/functions/parameters require descriptive names:

  • backtracking/all_combinations.py::generate_all_combinations::n
  • backtracking/all_combinations.py::generate_all_combinations::k
  • backtracking/rat_in_maze.py::run_maze::i
  • backtracking/rat_in_maze.py::run_maze::j
Relevant links 🔽

@ghost ghost added require descriptive names This PR needs descriptive function and/or variable names require tests Tests [doctest/unittest/pytest] are required and removed awaiting reviews This PR is ready to be reviewed labels Nov 29, 2020
@ghost ghost added tests are failing Do not merge until tests pass and removed tests are failing Do not merge until tests pass labels Nov 29, 2020
Copy link
Member

@dhruvmanila dhruvmanila left a comment

Choose a reason for hiding this comment

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

mypy passes for all files ❤️
Awesome job! Thanks for doing this 😄

@dhruvmanila dhruvmanila merged commit 25164bb into TheAlgorithms:master Nov 29, 2020
@poyea poyea deleted the fix-mypy branch November 29, 2020 17:31
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
peRFectBeliever pushed a commit to peRFectBeliever/Python that referenced this pull request Apr 1, 2021
Panquesito7 pushed a commit to Panquesito7/Python that referenced this pull request May 13, 2021
shermanhui pushed a commit to shermanhui/Python that referenced this pull request Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
require descriptive names This PR needs descriptive function and/or variable names require tests Tests [doctest/unittest/pytest] are required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants