Skip to content

Commit 7807ab2

Browse files
authored
Merge pull request #2665 from sdaulton/fix_precommit
Update precommit
2 parents 4422e9e + 0e43eef commit 7807ab2

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.2.0
3+
rev: v6.0.0
44
hooks:
5-
- id: check-byte-order-marker
5+
- id: fix-byte-order-marker
66
- id: check-case-conflict
77
- id: check-merge-conflict
88
- id: end-of-file-fixer
@@ -12,29 +12,29 @@ repos:
1212
- id: trailing-whitespace
1313
- id: debug-statements
1414
- repo: https://github.com/pycqa/flake8
15-
rev: 4.0.1
15+
rev: 7.3.0
1616
hooks:
1717
- id: flake8
1818
args: [--config=setup.cfg]
1919
exclude: ^(examples/.*)|(docs/.*)
2020
- repo: https://github.com/omnilib/ufmt
21-
rev: v2.0.0
21+
rev: v2.8.0
2222
hooks:
2323
- id: ufmt
2424
additional_dependencies:
2525
- black == 22.3.0
2626
- usort == 1.0.3
2727
exclude: ^(build/.*)|(docs/.*)|(examples/.*)
2828
- repo: https://github.com/jumanjihouse/pre-commit-hooks
29-
rev: 2.1.6
29+
rev: 3.0.0
3030
hooks:
3131
- id: require-ascii
3232
exclude: ^(examples/.*\.ipynb)|(.github/ISSUE_TEMPLATE/.*)
3333
- id: script-must-have-extension
3434
- id: forbid-binary
3535
exclude: ^(examples/.*)|(test/examples/old_variational_strategy_model.pth)
3636
- repo: https://github.com/Lucas-C/pre-commit-hooks
37-
rev: v1.1.13
37+
rev: v1.5.5
3838
hooks:
3939
- id: forbid-crlf
4040
- id: forbid-tabs

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def _process(annotation, config):
292292
This function is recursive.
293293
"""
294294
# Simple/base case: any string annotation is ready to go
295-
if type(annotation) == str:
295+
if isinstance(annotation, str):
296296
return annotation
297297

298298
# Jaxtyping: shaped tensors or linear operator

gpytorch/constraints/constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, lower_bound, upper_bound, transform=sigmoid, inv_transform=in
3232
if torch.any(torch.ge(lower_bound, upper_bound)):
3333
raise ValueError("Got parameter bounds with empty intervals.")
3434

35-
if type(self) == Interval:
35+
if type(self) is Interval:
3636
max_bound = torch.max(upper_bound)
3737
min_bound = torch.min(lower_bound)
3838
if max_bound == math.inf or min_bound == -math.inf:

gpytorch/test/base_test_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def assertEqual(self, item1, item2):
5858
raise AssertionError(f"item1 ({type(item1)}) and item2 ({type(item2)}) are not the same type.")
5959
elif item1 == item2:
6060
return True
61-
elif type(item1) != type(item2):
61+
elif type(item1) is type(item2):
6262
raise AssertionError(f"item1 ({type(item1)}) and item2 ({type(item2)}) are not the same type.")
6363
else:
6464
raise AssertionError(f"tensor1 ({item1}) does not equal tensor2 ({item2}).")

0 commit comments

Comments
 (0)