fix: correct typos (#1422) · python-zeroconf/python-zeroconf@3991b42

8 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -172,7 +172,7 @@ def async_entries_with_server(self, name: str) -> Dict[DNSRecord, DNSRecord]:

172172
173173

# The below functions are threadsafe and do not need to be run in the

174174

# event loop, however they all make copies so they significantly

175-

# inefficent

175+

# inefficient.

176176
177177

def get(self, entry: DNSEntry) -> Optional[DNSRecord]:

178178

"""Gets an entry by key. Will return None if there is no

Original file line numberDiff line numberDiff line change

@@ -84,10 +84,10 @@

8484

_UNREGISTER_TIME,

8585

)

8686
87-

# The maximum amont of time to delay a multicast

87+

# The maximum amount of time to delay a multicast

8888

# response in order to aggregate answers

8989

_AGGREGATION_DELAY = 500 # ms

90-

# The maximum amont of time to delay a multicast

90+

# The maximum amount of time to delay a multicast

9191

# response in order to aggregate answers after

9292

# it has already been delayed to protect the network

9393

# from excessive traffic. We use a shorter time

Original file line numberDiff line numberDiff line change

@@ -441,7 +441,7 @@ def handle_assembled_query(

441441

) -> None:

442442

"""Respond to a (re)assembled query.

443443
444-

If the protocol recieved packets with the TC bit set, it will

444+

If the protocol received packets with the TC bit set, it will

445445

wait a bit for the rest of the packets and only call

446446

handle_assembled_query once it has a complete set of packets

447447

or the timer expires. If the TC bit is not set, a single

@@ -457,7 +457,7 @@ def handle_assembled_query(

457457

id_ = first_packet.id

458458

out = construct_outgoing_unicast_answers(question_answers.ucast, ucast_source, questions, id_)

459459

# When sending unicast, only send back the reply

460-

# via the same socket that it was recieved from

460+

# via the same socket that it was received from

461461

# as we know its reachable from that socket

462462

self.zc.async_send(out, addr, port, v6_flow_scope, transport)

463463

if question_answers.mcast_now:

Original file line numberDiff line numberDiff line change

@@ -146,7 +146,7 @@ def async_updates_from_response(self, msg: DNSIncoming) -> None:

146146

# that any ServiceBrowser that is going to call

147147

# zc.get_service_info will see the cached value

148148

# but ONLY after all the record updates have been

149-

# processsed.

149+

# processed.

150150

new = False

151151

if other_adds or address_adds:

152152

new = cache.async_add_records(address_adds)

Original file line numberDiff line numberDiff line change

@@ -241,7 +241,7 @@ def _respond_query(

241241

def error_received(self, exc: Exception) -> None:

242242

"""Likely socket closed or IPv6."""

243243

# We preformat the message string with the socket as we want

244-

# log_exception_once to log a warrning message once PER EACH

244+

# log_exception_once to log a warning message once PER EACH

245245

# different socket in case there are problems with multiple

246246

# sockets

247247

msg_str = f"Error with socket {self.sock_description}): %s"

Original file line numberDiff line numberDiff line change

@@ -171,7 +171,7 @@ def num_additionals(self) -> int:

171171

return self._num_additionals

172172
173173

def _initial_parse(self) -> None:

174-

"""Parse the data needed to initalize the packet object."""

174+

"""Parse the data needed to initialize the packet object."""

175175

self._read_header()

176176

self._read_questions()

177177

if not self._num_questions:

Original file line numberDiff line numberDiff line change

@@ -221,7 +221,7 @@ def name(self) -> str:

221221
222222

@name.setter

223223

def name(self, name: str) -> None:

224-

"""Replace the the name and reset the key."""

224+

"""Replace the name and reset the key."""

225225

self._name = name

226226

self.key = name.lower()

227227

self._dns_service_cache = None

Original file line numberDiff line numberDiff line change

@@ -28,7 +28,7 @@

2828

def current_time_millis() -> _float:

2929

"""Current time in milliseconds.

3030
31-

The current implemention uses `time.monotonic`

31+

The current implementation uses `time.monotonic`

3232

but may change in the future.

3333
3434

The design requires the time to match asyncio.loop.time()