Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/zeroconf/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def async_entries_with_server(self, name: str) -> Dict[DNSRecord, DNSRecord]:

# The below functions are threadsafe and do not need to be run in the
# event loop, however they all make copies so they significantly
# inefficent
# inefficient.

def get(self, entry: DNSEntry) -> Optional[DNSRecord]:
"""Gets an entry by key. Will return None if there is no
Expand Down
4 changes: 2 additions & 2 deletions src/zeroconf/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
_UNREGISTER_TIME,
)

# The maximum amont of time to delay a multicast
# The maximum amount of time to delay a multicast
# response in order to aggregate answers
_AGGREGATION_DELAY = 500 # ms
# The maximum amont of time to delay a multicast
# The maximum amount of time to delay a multicast
# response in order to aggregate answers after
# it has already been delayed to protect the network
# from excessive traffic. We use a shorter time
Expand Down
4 changes: 2 additions & 2 deletions src/zeroconf/_handlers/query_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def handle_assembled_query(
) -> None:
"""Respond to a (re)assembled query.

If the protocol recieved packets with the TC bit set, it will
If the protocol received packets with the TC bit set, it will
wait a bit for the rest of the packets and only call
handle_assembled_query once it has a complete set of packets
or the timer expires. If the TC bit is not set, a single
Expand All @@ -457,7 +457,7 @@ def handle_assembled_query(
id_ = first_packet.id
out = construct_outgoing_unicast_answers(question_answers.ucast, ucast_source, questions, id_)
# When sending unicast, only send back the reply
# via the same socket that it was recieved from
# via the same socket that it was received from
# as we know its reachable from that socket
self.zc.async_send(out, addr, port, v6_flow_scope, transport)
if question_answers.mcast_now:
Expand Down
2 changes: 1 addition & 1 deletion src/zeroconf/_handlers/record_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def async_updates_from_response(self, msg: DNSIncoming) -> None:
# that any ServiceBrowser that is going to call
# zc.get_service_info will see the cached value
# but ONLY after all the record updates have been
# processsed.
# processed.
new = False
if other_adds or address_adds:
new = cache.async_add_records(address_adds)
Expand Down
2 changes: 1 addition & 1 deletion src/zeroconf/_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _respond_query(
def error_received(self, exc: Exception) -> None:
"""Likely socket closed or IPv6."""
# We preformat the message string with the socket as we want
# log_exception_once to log a warrning message once PER EACH
# log_exception_once to log a warning message once PER EACH
# different socket in case there are problems with multiple
# sockets
msg_str = f"Error with socket {self.sock_description}): %s"
Expand Down
2 changes: 1 addition & 1 deletion src/zeroconf/_protocol/incoming.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def num_additionals(self) -> int:
return self._num_additionals

def _initial_parse(self) -> None:
"""Parse the data needed to initalize the packet object."""
"""Parse the data needed to initialize the packet object."""
self._read_header()
self._read_questions()
if not self._num_questions:
Expand Down
2 changes: 1 addition & 1 deletion src/zeroconf/_services/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def name(self) -> str:

@name.setter
def name(self, name: str) -> None:
"""Replace the the name and reset the key."""
"""Replace the name and reset the key."""
self._name = name
self.key = name.lower()
self._dns_service_cache = None
Expand Down
2 changes: 1 addition & 1 deletion src/zeroconf/_utils/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
def current_time_millis() -> _float:
"""Current time in milliseconds.

The current implemention uses `time.monotonic`
The current implementation uses `time.monotonic`
but may change in the future.

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