Average mean refactor by haningrisha · Pull Request #4485 · TheAlgorithms/Python · GitHub
Skip to content

Average mean refactor - #4485

Merged
l3str4nge merged 3 commits into
TheAlgorithms:masterfrom
haningrisha:average_mean_doctests
Jun 16, 2021
Merged

l3str4nge merged 3 commits into
TheAlgorithms:masterfrom
haningrisha:average_mean_doctests

Conversation

@haningrisha

@haningrisha haningrisha commented Jun 5, 2021

Copy link
Copy Markdown
Contributor

Added doctests and type hints to average_mean

Describe your change:

  • Doctests added instead of assert function

  • Type hints added

  • Function name changed from average to mean to keep consistency

  • Wikipedia link added

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

Added doctests and type hints to average_mean
@haningrisha
haningrisha requested a review from Kush1101 as a code owner June 5, 2021 17:10
@ghost ghost added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Jun 5, 2021
Comment thread maths/average_mean.py Outdated
Comment thread maths/average_mean.py
Empty list check added
Type hint changed to typing.List
@l3str4nge
l3str4nge merged commit 7d19d54 into TheAlgorithms:master Jun 16, 2021
@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Jun 16, 2021
shermanhui pushed a commit to shermanhui/Python that referenced this pull request Oct 22, 2021
* Average mean refactor

Added doctests and type hints to average_mean

* Wiki link added

* Empty list check added

Empty list check added
Type hint changed to typing.List
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants