mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
Update our pre-commit dependencies (#4273)
* .pre-commit-config.yaml: mypy directories that pass * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
parent
b8a19ccfea
commit
987567360e
|
@ -1,6 +1,6 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
rev: v3.4.0
|
||||
hooks:
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-yaml
|
||||
|
@ -13,17 +13,17 @@ repos:
|
|||
)$
|
||||
- id: requirements-txt-fixer
|
||||
- repo: https://github.com/psf/black
|
||||
rev: stable
|
||||
rev: 20.8b1
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.5.3
|
||||
rev: 5.7.0
|
||||
hooks:
|
||||
- id: isort
|
||||
args:
|
||||
- --profile=black
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.8.3
|
||||
rev: 3.9.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
args:
|
||||
|
@ -38,11 +38,11 @@ repos:
|
|||
# args:
|
||||
# - --ignore-missing-imports
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v1.17.1
|
||||
rev: v2.0.0
|
||||
hooks:
|
||||
- id: codespell
|
||||
args:
|
||||
- --ignore-words-list=ans,fo,followings,hist,iff,mater,secant,som,tim
|
||||
- --ignore-words-list=ans,crate,fo,followings,hist,iff,mater,secant,som,tim
|
||||
- --skip="./.*,./other/dictionary.txt,./other/words,./project_euler/problem_022/p022_names.txt"
|
||||
- --quiet-level=2
|
||||
exclude: |
|
||||
|
|
|
@ -32,7 +32,7 @@ def classifier(train_data, train_target, classes, point, k=5):
|
|||
:train_data: Set of points that are classified into two or more classes
|
||||
:train_target: List of classes in the order of train_data points
|
||||
:classes: Labels of the classes
|
||||
:point: The data point that needs to be classifed
|
||||
:point: The data point that needs to be classified
|
||||
|
||||
>>> X_train = [[0, 0], [1, 0], [0, 1], [0.5, 0.5], [3, 3], [2, 3], [3, 2]]
|
||||
>>> y_train = [0, 0, 0, 0, 1, 1, 1]
|
||||
|
|
|
@ -5,7 +5,7 @@ def evaluate_poly(poly: Sequence[float], x: float) -> float:
|
|||
"""Evaluate a polynomial f(x) at specified point x and return the value.
|
||||
|
||||
Arguments:
|
||||
poly -- the coeffiecients of a polynomial as an iterable in order of
|
||||
poly -- the coefficients of a polynomial as an iterable in order of
|
||||
ascending degree
|
||||
x -- the point at which to evaluate the polynomial
|
||||
|
||||
|
@ -26,7 +26,7 @@ def horner(poly: Sequence[float], x: float) -> float:
|
|||
https://en.wikipedia.org/wiki/Horner's_method
|
||||
|
||||
Arguments:
|
||||
poly -- the coeffiecients of a polynomial as an iterable in order of
|
||||
poly -- the coefficients of a polynomial as an iterable in order of
|
||||
ascending degree
|
||||
x -- the point at which to evaluate the polynomial
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class SearchProblem:
|
|||
|
||||
def __hash__(self):
|
||||
"""
|
||||
hash the string represetation of the current search state.
|
||||
hash the string representation of the current search state.
|
||||
"""
|
||||
return hash(str(self))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user