Skip to content

Commit 78fc22d

Browse files
committed
fix: tests and lints
1 parent 43f3bf5 commit 78fc22d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/firebase_functions/logger.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ def _entry_from_args(severity: LogSeverity, *args, **kwargs) -> LogEntry:
4646
for value in args
4747
])
4848

49-
object: _typing.Dict[str, _typing.Any] = {
49+
other: _typing.Dict[str, _typing.Any] = {
5050
key: value if isinstance(value, str) else _remove_circular(value)
5151
for key, value in kwargs.items()}
5252

53-
entry = {"severity": severity, **object}
53+
entry: _typing.Dict[str, _typing.Any] = {"severity": severity, **other}
5454
if message:
5555
entry["message"] = message
5656

tests/test_logger.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ def test_severity_should_be_error(self, capsys: pytest.CaptureFixture[str]):
6060
assert log_output["severity"] == "ERROR"
6161

6262
def test_log_should_have_message(self, capsys: pytest.CaptureFixture[str]):
63-
logger.log(foo="bar")
63+
logger.log("bar")
6464
raw_log_output = capsys.readouterr().out
6565
log_output = json.loads(raw_log_output)
6666
assert "message" in log_output
6767

68-
def test_log_should_have_other_keys(self, capsys: pytest.CaptureFixture[str]):
68+
def test_log_should_have_other_keys(self,
69+
capsys: pytest.CaptureFixture[str]):
6970
logger.log(foo="bar")
7071
raw_log_output = capsys.readouterr().out
7172
log_output = json.loads(raw_log_output)

0 commit comments

Comments
 (0)