mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-08-09 00:04:46 +02:00
Use black as formatter for python files
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
from pathlib import Path
|
||||
|
||||
from ruamel.yaml import YAML
|
||||
|
||||
|
||||
def load_yaml(yaml_file: str):
|
||||
yf = Path(yaml_file)
|
||||
if not yf.is_file():
|
||||
return None
|
||||
with yf.open("r") as stream:
|
||||
yaml = YAML(typ="safe")
|
||||
return yaml.load(stream)
|
||||
yf = Path(yaml_file)
|
||||
if not yf.is_file():
|
||||
return None
|
||||
with yf.open("r") as stream:
|
||||
yaml = YAML(typ="safe")
|
||||
return yaml.load(stream)
|
||||
|
Reference in New Issue
Block a user