Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JHolba committed Dec 3, 2024
1 parent 0ee3d49 commit a5e65cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ert/ensemble_evaluator/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import typing
import warnings
from base64 import b64encode
from datetime import datetime, timedelta
from datetime import UTC, datetime, timedelta
from typing import Optional

from cryptography import x509
Expand Down Expand Up @@ -71,8 +71,8 @@ def _generate_certificate(
.issuer_name(issuer)
.public_key(key.public_key())
.serial_number(x509.random_serial_number())
.not_valid_before(datetime.utcnow())
.not_valid_after(datetime.utcnow() + timedelta(days=365)) # 1 year
.not_valid_before(datetime.now(UTC))
.not_valid_after(datetime.now(UTC) + timedelta(days=365)) # 1 year
.add_extension(
x509.SubjectAlternativeName(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _mock_ws(host, port, messages, delay_startup=0):
loop = new_event_loop()
done = loop.create_future()

async def _handler(websocket, path):
async def _handler(websocket):
while True:
msg = await websocket.recv()
messages.append(msg)
Expand Down
2 changes: 1 addition & 1 deletion tests/ert/unit_tests/gui/tools/plot/test_plot_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_plot_api_request_errors(api):
def api_and_storage(monkeypatch, tmp_path):
with open_storage(tmp_path / "storage", mode="w") as storage:
monkeypatch.setenv("ERT_STORAGE_NO_TOKEN", "yup")
monkeypatch.setenv("ERT_STORAGE_ENS_PATH", storage.path)
monkeypatch.setenv("ERT_STORAGE_ENS_PATH", str(storage.path))
api = PlotApi()
yield api, storage
if enkf._storage is not None:
Expand Down

0 comments on commit a5e65cd

Please sign in to comment.