pantalaimon: Fix some lint issues.

This commit is contained in:
Damir Jelić 2020-04-29 16:49:06 +02:00
parent bf8bded354
commit d58b761462
3 changed files with 6 additions and 7 deletions

View File

@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from importlib import util
class InvalidQueryError(Exception):
pass

View File

@ -237,6 +237,7 @@ async def daemon(context, log_level, debug_encryption, config, data_path):
raise
@click.command(
help=(
"pantalaimon is a reverse proxy for matrix homeservers that "
@ -255,7 +256,6 @@ async def daemon(context, log_level, debug_encryption, config, data_path):
@click.option("--data-path", type=click.Path(exists=True))
@click.pass_context
def main(context, log_level, debug_encryption, config, data_path):
event = asyncio.Event()
try:
asyncio.run(daemon(context, log_level, debug_encryption, config, data_path))
except (KeyboardInterrupt, asyncio.CancelledError):
@ -263,5 +263,6 @@ def main(context, log_level, debug_encryption, config, data_path):
return
if __name__ == "__main__":
main()

View File

@ -530,7 +530,7 @@ class PanCtl:
)
if user_list:
print(f" - Pan users:")
print(" - Pan users:")
user_string = "\n".join(user_list)
print_formatted_text(HTML(user_string))
@ -541,11 +541,11 @@ class PanCtl:
for device in devices:
if device["trust_state"] == "verified":
trust_state = f"<ansigreen>Verified</ansigreen>"
trust_state = "<ansigreen>Verified</ansigreen>"
elif device["trust_state"] == "blacklisted":
trust_state = f"<ansired>Blacklisted</ansired>"
trust_state = "<ansired>Blacklisted</ansired>"
elif device["trust_state"] == "ignored":
trust_state = f"Ignored"
trust_state = "Ignored"
else:
trust_state = "Unset"