mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
batch 2 - update Python idiom to 3.7 using pyupgrade (#11342)
* batch 2 - update Python idiom to 3.7 using pyupgrade * Apply suggestions from code review
This commit is contained in:
@@ -34,13 +34,13 @@ def inventory():
|
||||
|
||||
|
||||
def load_txt_data(path):
|
||||
with open(path, "r") as f:
|
||||
with open(path) as f:
|
||||
s = f.read()
|
||||
return s
|
||||
|
||||
|
||||
def load_yml_data(path):
|
||||
with open(path, "r") as f:
|
||||
with open(path) as f:
|
||||
d = yaml.safe_load(f)
|
||||
return d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user