We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38d4bbd commit aa5168aCopy full SHA for aa5168a
protobuf_to_pydantic/util.py
@@ -137,10 +137,10 @@ def format_content(content_str: str, pyproject_file_path: str = "") -> str:
137
"The toml module is not installed and the configuration information cannot be obtained through"
138
" pyproject.toml"
139
)
140
- return content_str
141
- pyproject_content = get_pyproject_content(pyproject_file_path)
142
- if pyproject_content:
143
- pyproject_dict = toml.loads(pyproject_content)
+ else:
+ pyproject_content = get_pyproject_content(pyproject_file_path)
+ if pyproject_content:
+ pyproject_dict = toml.loads(pyproject_content)
144
try:
145
p2p_format_dict: dict = pyproject_dict["tool"]["protobuf-to-pydantic"]["format"]
146
except KeyError:
0 commit comments