clean: remove unused imports

This commit is contained in:
mathieui 2022-02-10 18:42:54 +01:00 committed by Maxime “pep” Buquet
parent fbd3d0bcfd
commit aaa6911a39
14 changed files with 9 additions and 29 deletions

View file

@ -1,7 +1,6 @@
from typing import Tuple, Dict, List, Union
import curses
import hashlib
import math
from . import hsluv

View file

@ -14,7 +14,7 @@ from datetime import (
timezone,
)
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union, Any
from typing import Dict, List, Optional, Tuple, Union
import os
import subprocess
@ -23,7 +23,7 @@ import string
import logging
import itertools
from slixmpp import JID, InvalidJID, Message
from slixmpp import Message
from poezio.poezio_shlex import shlex
log = logging.getLogger(__name__)

View file

@ -8,7 +8,7 @@ from xml.etree import ElementTree as ET
from typing import List, Optional, Tuple
import logging
from slixmpp import Iq, JID, InvalidJID
from slixmpp import JID, InvalidJID
from slixmpp.exceptions import XMPPError, IqError, IqTimeout
from slixmpp.xmlstream.xmlstream import NotConnectedError
from slixmpp.xmlstream.stanzabase import StanzaBase

View file

@ -15,7 +15,6 @@ import pipes
import sys
import shutil
import time
import uuid
from collections import defaultdict
from typing import (
Any,

View file

@ -4,19 +4,16 @@ XMPP-related handlers for the Core class
import logging
from typing import Optional, Union
from typing import Optional
import asyncio
import curses
import functools
import select
import signal
import ssl
import sys
import time
from datetime import datetime
from hashlib import sha1, sha256, sha512
from os import path
import pyasn1.codec.der.decoder
import pyasn1.codec.der.encoder
@ -25,8 +22,6 @@ from slixmpp import InvalidJID, JID, Message, Iq, Presence
from slixmpp.xmlstream.stanzabase import StanzaBase, ElementBase
from xml.etree import ElementTree as ET
from poezio import common
from poezio import fixes
from poezio import tabs
from poezio import xhtml
from poezio import multiuserchat as muc
@ -36,12 +31,10 @@ from poezio.core.structs import Status
from poezio.contact import Resource
from poezio.logger import logger
from poezio.roster import roster
from poezio.text_buffer import CorrectionError, AckError
from poezio.text_buffer import AckError
from poezio.theming import dump_tuple, get_theme
from poezio.ui.types import (
XMLLog,
Message as PMessage,
BaseMessage,
InfoMessage,
PersistentInfoMessage,
)

View file

@ -5,17 +5,14 @@ upstream.
TODO: Check that they are fixed and remove those hacks
"""
import asyncio
from typing import Callable, Any
from slixmpp import Message, Iq, ClientXMPP
from slixmpp.xmlstream import ET
from slixmpp import ClientXMPP, Message
import logging
log = logging.getLogger(__name__)
def _filter_add_receipt_request(self, stanza):
def _filter_add_receipt_request(self: ClientXMPP, stanza):
"""
Auto add receipt requests to outgoing messages, if:

View file

@ -5,7 +5,6 @@
from __future__ import annotations
import asyncio
import logging
from datetime import datetime, timedelta, timezone
from hashlib import md5

View file

@ -22,7 +22,6 @@ from slixmpp import JID, InvalidJID, Message as SMessage
from poezio.tabs.basetabs import OneToOneTab, Tab
from poezio import common
from poezio import tabs
from poezio import windows
from poezio import xhtml
from poezio.config import config, get_image_cache

View file

@ -10,7 +10,6 @@ log = logging.getLogger(__name__)
import curses
import os
from typing import Union, Optional
from slixmpp import JID, InvalidJID
from slixmpp.xmlstream import matcher, StanzaBase
from slixmpp.xmlstream.tostring import tostring

View file

@ -73,7 +73,6 @@ except ImportError:
import curses
import functools
import os
from typing import Dict, List, Union, Tuple, Optional, cast
from pathlib import Path
from os import path

View file

@ -1,5 +1,3 @@
from datetime import datetime
FORMAT_CHAR = '\x19'
# These are non-printable chars, so they should never appear in the input,
# I guess. But maybe we can find better chars that are even less risky.

View file

@ -12,7 +12,6 @@ A user is a MUC participant, not a roster contact (see contact.py)
import logging
from datetime import timedelta, datetime
from hashlib import md5
from random import choice
from typing import Optional, Tuple
from poezio import xhtml, colors

View file

@ -5,7 +5,7 @@ Text inputs.
import curses
import logging
import string
from typing import List, Dict, Callable, Optional, ClassVar, Union
from typing import List, Dict, Callable, Optional, ClassVar
from poezio import keyboard
from poezio import common

View file

@ -6,11 +6,10 @@ import logging
log = logging.getLogger(__name__)
from datetime import datetime
from typing import Optional, List, Union, Dict
from typing import Optional, List, Union
from poezio.windows.base_wins import Win
from poezio import common
from poezio.config import config
from poezio.contact import Contact, Resource
from poezio.roster import Roster, RosterGroup