Skip to content

Commit 6529c9e

Browse files
committed
Add some typing to puppet module
This silent errors reported by mypy --check-untyped-defs
1 parent 45ca1a2 commit 6529c9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

testinfra/modules/puppet.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
# limitations under the License.
1212

1313
import json
14+
from typing import Dict
1415

1516
from testinfra.modules.base import InstanceModule
1617

1718

18-
def parse_puppet_resource(data):
19+
def parse_puppet_resource(data: str) -> Dict[str, Dict[str, str]]:
1920
"""Parse data returned by 'puppet resource'
2021
2122
$ puppet resource user
@@ -37,7 +38,7 @@ def parse_puppet_resource(data):
3738
[...]
3839
"""
3940

40-
state = {}
41+
state: Dict[str, Dict[str, str]] = {}
4142
current = None
4243
for line in data.splitlines():
4344
if not current:

0 commit comments

Comments
 (0)