Skip to content

Commit 1247acd

Browse files
authored
Remove some pylint workarounds (#925)
1 parent 6774de3 commit 1247acd

9 files changed

Lines changed: 9 additions & 16 deletions

File tree

zeroconf/_dns.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848

4949

5050
if TYPE_CHECKING:
51-
# https://github.com/PyCQA/pylint/issues/3525
52-
from ._protocol import DNSIncoming, DNSOutgoing # pylint: disable=cyclic-import
51+
from ._protocol import DNSIncoming, DNSOutgoing
5352

5453

5554
@enum.unique

zeroconf/_handlers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
)
4949

5050
if TYPE_CHECKING:
51-
# https://github.com/PyCQA/pylint/issues/3525
52-
from ._core import Zeroconf # pylint: disable=cyclic-import
51+
from ._core import Zeroconf
5352

5453

5554
_AnswerWithAdditionalsType = Dict[DNSRecord, Set[DNSRecord]]

zeroconf/_logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import sys
2525
from typing import Any, Dict, Union, cast
2626

27-
log = logging.getLogger(__name__.split('.')[0])
27+
log = logging.getLogger(__name__.split('.', maxsplit=1)[0])
2828
log.addHandler(logging.NullHandler())
2929

3030

zeroconf/_protocol.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151

5252

5353
if TYPE_CHECKING:
54-
# https://github.com/PyCQA/pylint/issues/3525
55-
from ._cache import DNSCache # pylint: disable=cyclic-import
54+
from ._cache import DNSCache
5655

5756

5857
class DNSMessage:

zeroconf/_services/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525

2626

2727
if TYPE_CHECKING:
28-
# https://github.com/PyCQA/pylint/issues/3525
29-
from .._core import Zeroconf # pylint: disable=cyclic-import
28+
from .._core import Zeroconf
3029

3130

3231
@enum.unique

zeroconf/_services/browser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
}
6666

6767
if TYPE_CHECKING:
68-
# https://github.com/PyCQA/pylint/issues/3525
69-
from .._core import Zeroconf # pylint: disable=cyclic-import
68+
from .._core import Zeroconf
7069

7170

7271
_QuestionWithKnownAnswers = Dict[DNSQuestion, Set[DNSPointer]]

zeroconf/_services/info.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353

5454

5555
if TYPE_CHECKING:
56-
# https://github.com/PyCQA/pylint/issues/3525
57-
from .._core import Zeroconf # pylint: disable=cyclic-import
56+
from .._core import Zeroconf
5857

5958

6059
def instance_name_from_service_info(info: "ServiceInfo") -> str:

zeroconf/_updates.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727

2828

2929
if TYPE_CHECKING:
30-
# https://github.com/PyCQA/pylint/issues/3525
31-
from ._core import Zeroconf # pylint: disable=cyclic-import
30+
from ._core import Zeroconf
3231

3332

3433
class RecordUpdate(NamedTuple):

zeroconf/_utils/net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def set_mdns_port_socket_options_for_ip_version(
211211
s.setsockopt(_IPPROTO_IPV6, socket.IPV6_MULTICAST_LOOP, True)
212212

213213

214-
def new_socket( # pylint: disable=too-many-branches
214+
def new_socket(
215215
bind_addr: Union[Tuple[str], Tuple[str, int, int]],
216216
port: int = _MDNS_PORT,
217217
ip_version: IPVersion = IPVersion.V4Only,

0 commit comments

Comments
 (0)