Skip to content

Change default parser mode to json_or_yaml and say which format failed in parse errors - #1004

Merged
mauvilsa merged 2 commits into
mainfrom
json-or-yaml-parser-mode
Oct 6, 2026
Merged

mauvilsa merged 2 commits into
mainfrom
json-or-yaml-parser-mode

Address comments

1ad358d
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Oct 6, 2026 in 40s

Annotations

Check failure on line 237 in jsonargparse/_loaders_dumpers.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=mauvilsa_jsonargparse&issues=AaEPq1LJ5Fxz_DXxwAiy&open=AaEPq1LJ5Fxz_DXxwAiy&pullRequest=1004

Check warning on line 385 in jsonargparse/_loaders_dumpers.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested conditional expression into an independent statement.

See more on https://sonarcloud.io/project/issues?id=mauvilsa_jsonargparse&issues=AaEPq1LJ5Fxz_DXxwAiz&open=AaEPq1LJ5Fxz_DXxwAiz&pullRequest=1004

Check failure on line 401 in jsonargparse/_formatters.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to not always return the same value.

See more on https://sonarcloud.io/project/issues?id=mauvilsa_jsonargparse&issues=AaEPwwoPlR59u-oENHhF&open=AaEPwwoPlR59u-oENHhF&pullRequest=1004