summaryrefslogtreecommitdiff
path: root/test/lib/ansible_test/_internal/io.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2022-08-04 12:15:46 -0700
committerGitHub <noreply@github.com>2022-08-04 12:15:46 -0700
commitb993b5cd49662f715774c333ce98e2845227ab66 (patch)
tree440b4073063fda4e05b972e4157c429d03ba38e9 /test/lib/ansible_test/_internal/io.py
parent2218b63aefc558ff967a8597a1dc9c4c5f88e27c (diff)
downloadansible-b993b5cd49662f715774c333ce98e2845227ab66.tar.gz
ansible-test - Convert more type hints. (#78449)
* Simple regex replace of multi-line function arg annotations. * Simple regex replace of multi-line function arg annotations with default values. * Simple regex replace of multi-line function arg return annotations. * Simple regex replace of assignment annotations.
Diffstat (limited to 'test/lib/ansible_test/_internal/io.py')
-rw-r--r--test/lib/ansible_test/_internal/io.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/lib/ansible_test/_internal/io.py b/test/lib/ansible_test/_internal/io.py
index e29a1a56a5..130d611f44 100644
--- a/test/lib/ansible_test/_internal/io.py
+++ b/test/lib/ansible_test/_internal/io.py
@@ -40,11 +40,11 @@ def make_dirs(path: str) -> None:
def write_json_file(path, # type: str
- content, # type: t.Any
- create_directories=False, # type: bool
- formatted=True, # type: bool
- encoder=None, # type: t.Optional[t.Type[json.JSONEncoder]]
- ): # type: (...) -> str
+ content: t.Any,
+ create_directories: bool = False,
+ formatted: bool = True,
+ encoder: t.Optional[t.Type[json.JSONEncoder]] = None,
+ ) -> str:
"""Write the given json content to the specified path, optionally creating missing directories."""
text_content = json.dumps(content,
sort_keys=formatted,