mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-23 05:41:13 -05:00
pantalaimon: Fix some lint issues.
This commit is contained in:
parent
bf8bded354
commit
d58b761462
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user