pmb.helpers.logging: wrap logging module (MR 2252)

We use a custom verbose log level in pmbootstrap, unfortunately it isn't
possible to correctly type this due to some limitations in the logging
library [1], [2].

Given that our usecase is fairly simple, we can just wrap the module
with our own so we only have to tell mypy to ignore the error once
instead of at every callsite.

[1]: https://github.com/cryptax/droidlysis/issues/15
[2]: https://github.com/python/typing/discussions/980

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-04-04 04:05:53 +02:00 committed by Oliver Smith
parent 4b6c198ca4
commit 71e7af57e6
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
65 changed files with 110 additions and 69 deletions

View file

@ -1,7 +1,7 @@
# Copyright 2023 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
import datetime
import logging
from pmb.helpers import logging
import os
import re
import readline