This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree 3 files changed +13
-10
lines changed
3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ repos:
17
17
hooks :
18
18
- id : isort
19
19
- repo : https://github.com/psf/black
20
- rev : 22.3 .0
20
+ rev : 22.6 .0
21
21
hooks :
22
22
- id : black
23
23
language_version : python3
24
24
- repo : https://github.com/pre-commit/pre-commit-hooks.git
25
- rev : v4.2 .0
25
+ rev : v4.3 .0
26
26
hooks :
27
27
- id : end-of-file-fixer
28
28
- id : trailing-whitespace
41
41
- flake8-absolute-import>=1.0
42
42
- flake8-docstrings>=1.6.0
43
43
language_version : python3
44
- - repo : https://github.com/ansible-community /ansible-lint.git
45
- rev : v6.0.2
44
+ - repo : https://github.com/ansible/ansible-lint.git
45
+ rev : v6.3.0
46
46
hooks :
47
47
- id : ansible-lint
48
48
always_run : true
52
52
- ansible-core>=2.11
53
53
- yamllint
54
54
- repo : https://github.com/pre-commit/mirrors-mypy
55
- rev : v0.942
55
+ rev : v0.961
56
56
hooks :
57
57
- id : mypy
58
58
# empty args needed in order to match mypy cli behavior
65
65
- packaging
66
66
- types-requests
67
67
- repo : https://github.com/PyCQA/pylint
68
- rev : v2.13.5
68
+ rev : v2.14.4
69
69
hooks :
70
70
- id : pylint
71
71
additional_dependencies :
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ disable =
4
4
# TODO(ssbarnea): remove temporary skips adding during initial adoption:
5
5
abstract-method,
6
6
arguments-differ,
7
- bad-continuation,
8
7
broad-except,
9
8
consider-merging-isinstance,
10
9
consider-using-in,
Original file line number Diff line number Diff line change 24
24
import os
25
25
from typing import Dict
26
26
27
- from ansible_compat .ports import cache
28
27
from molecule import logger
29
28
from molecule .api import Driver
30
29
from molecule .util import sysexit_with_message
@@ -183,6 +182,8 @@ class Docker(Driver):
183
182
.. _`CMD`: https://docs.docker.com/engine/reference/builder/#cmd
184
183
""" # noqa
185
184
185
+ _passed_sanity = False
186
+
186
187
def __init__ (self , config = None ):
187
188
"""Construct Docker."""
188
189
super (Docker , self ).__init__ (config )
@@ -224,11 +225,12 @@ def ansible_connection_options(self, instance_name):
224
225
x ["ansible_docker_extra_args" ] = f"-H={ os .environ ['DOCKER_HOST' ]} "
225
226
return x
226
227
227
- @cache
228
228
def sanity_checks (self ):
229
229
"""Implement Docker driver sanity checks."""
230
- log .info ("Sanity checks: '%s'" , self ._name )
230
+ if self ._passed_sanity :
231
+ return
231
232
233
+ log .info ("Sanity checks: '%s'" , self ._name )
232
234
try :
233
235
import docker
234
236
import requests
@@ -243,6 +245,8 @@ def sanity_checks(self):
243
245
)
244
246
sysexit_with_message (msg )
245
247
248
+ self ._passed_sanity = True
249
+
246
250
def reset (self ):
247
251
import docker
248
252
You can’t perform that action at this time.
0 commit comments