Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#202)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v2.2.3 → v4.2.0](pre-commit/pre-commit-hooks@v2.2.3...v4.2.0)
- [github.com/psf/black: 20.8b1 → 22.3.0](psf/black@20.8b1...22.3.0)
- https://github.com/pre-commit/mirrors-isorthttps://github.com/PyCQA/isort
- [github.com/PyCQA/isort: v5.6.4 → 5.10.1](PyCQA/isort@v5.6.4...5.10.1)

* Update .pre-commit-config.yaml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kevin Jablonka <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and kjappelbaum authored Apr 25, 2022
1 parent fde3172 commit 006be94
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: check-yaml
Expand Down Expand Up @@ -42,7 +42,7 @@ repos:


- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
language_version: python3
Expand All @@ -51,20 +51,20 @@ repos:
entry: black
types: [python]

- repo: https://github.com/pre-commit/mirrors-isort
rev: 'v5.6.4' # Use the revision sha / tag you want to point at
- repo: https://github.com/PyCQA/isort
rev: '5.10.1' # Use the revision sha / tag you want to point at
hooks:
- id: isort
name: isort
language: system
language: python
exclude: versioneer.py|pyepal/_version.py|^docs/
types: [python]
entry: isort

- repo: local
hooks:
- id: pylint
language: system
language: python
types: [file, python]
exclude: versioneer.py|pyepal/_version.py|^docs|pyepal/pal/_hypervolume.py|pyepal/models/coregionalized.py/tests
name: pylint
Expand Down
6 changes: 3 additions & 3 deletions pyepal/pal/_hypervolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def pop(self, index: int) -> None:


class VectorLinkedList:
""" Linked list structure with list of VectorNodes as elements."""
"""Linked list structure with list of VectorNodes as elements."""

def __init__(self, dimension: int) -> None:
self.dimension = dimension
Expand Down Expand Up @@ -120,7 +120,7 @@ def chain_length(self, index: int) -> int:
return length

def append(self, node: VectorNode, index: int) -> None:
""" Append a node to the `index`-th position."""
"""Append a node to the `index`-th position."""
current_last = self.sentinel.prev[index]
assert current_last is not None
node.next[index] = self.sentinel
Expand Down Expand Up @@ -327,7 +327,7 @@ def recursive_hypervolume(self, dimension: int) -> float:
return hypervolume

def skip_dominated_points(self, node: VectorNode, dimension: int) -> None:
""" Implements Algorithm 2, _skipdom_, for skipping dominated points."""
"""Implements Algorithm 2, _skipdom_, for skipping dominated points."""
if node.dominated_flag >= dimension:
node.area[dimension] = node.prev[dimension].area[dimension]
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

def binh_korn(x, y): # pylint:disable=invalid-name
"""https://en.wikipedia.org/wiki/Test_functions_for_optimization"""
obj1 = 4 * x ** 2 + 4 * y ** 2
obj1 = 4 * x**2 + 4 * y**2
obj2 = (x - 5) ** 2 + (y - 5) ** 2
return -obj1, -obj2

Expand Down
2 changes: 1 addition & 1 deletion tests/test_models_gpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_predict(make_random_dataset):


def test_predict_coregionalized(make_random_dataset):
""""Test that the prediction utility for coregionalized models works"""
""" "Test that the prediction utility for coregionalized models works"""
X, y = make_random_dataset # pylint:disable=invalid-name
m = build_coregionalized_model(X, y) # pylint:disable=invalid-name
prediction = predict_coregionalized(m, X)
Expand Down

0 comments on commit 006be94

Please sign in to comment.