Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5986bf6

Browse filesBrowse files
committed
Fix get_expiration_time percent parameter annotation
It takes integer percentage values at the moment so let's document that.
1 parent fcafdc1 commit 5986bf6
Copy full SHA for 5986bf6

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎zeroconf/__init__.py

Copy file name to clipboardExpand all lines: zeroconf/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def suppressed_by_answer(self, other):
478478
and if its TTL is at least half of this record's."""
479479
return self == other and other.ttl > (self.ttl / 2)
480480

481-
def get_expiration_time(self, percent: float) -> float:
481+
def get_expiration_time(self, percent: int) -> float:
482482
"""Returns the time at which this record will have expired
483483
by a certain percentage."""
484484
return self.created + (percent * self.ttl * 10)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.