Skip to content

Commit

Permalink
chore: ruff linter--fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Khushiyant committed Feb 8, 2024
1 parent d584562 commit 8a9d8f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/types/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def __init__(
'healthcheck start period was introduced in API '
'version 1.29'
)

if version_lt(version, '1.44') and 'StartInterval' in healthcheck:
raise errors.InvalidVersion(
'healthcheck start interval was introduced in API version 1.44'
Expand Down
4 changes: 2 additions & 2 deletions docker/types/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Healthcheck(DictType):
start_period (int): Start period for the container to
initialize before starting health-retries countdown in
nanoseconds. It should be 0 or at least 1000000 (1 ms).
start_interval (int): It is interval to be used by healthchecks during the start period in
start_interval (int): It is interval to be used by healthchecks during the start period in
nanoseconds. It should be 0 or at least 1000000 (1 ms).
"""
def __init__(self, **kwargs):
Expand Down Expand Up @@ -94,7 +94,7 @@ def start_period(self, value):
@property
def start_interval(self):
return self['StartInterval']

@start_interval.setter
def start_interval(self, value):
self['StartInterval'] = value
1 change: 0 additions & 1 deletion tests/integration/api_healthcheck_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ def test_healthcheck_start_interval(self):
self.tmp_containers.append(container)
self.client.start(container)
wait_on_health_status(self.client, container, "healthy")

0 comments on commit 8a9d8f0

Please sign in to comment.