sourcery icon indicating copy to clipboard operation
sourcery copied to clipboard

Config file schema's `python_version` does not match the format provided in documentation

Open tylerlaprade opened this issue 1 year ago • 4 comments

Checklist

Description

image

https://docs.sourcery.ai/resources/sourcery_yaml_schema.json

https://docs.sourcery.ai/Coding-Assistant/Reference/Configuration/sourcery-yaml/

tylerlaprade avatar Jul 19 '24 13:07 tylerlaprade

I can reproduce this

Hellebore avatar Jul 19 '24 14:07 Hellebore

Hey, @tylerlaprade!

I've just merged a fix for this, and it will be available in the next Sourcery release.

Thanks for opening this issue!

ruancomelli avatar Jul 24 '24 18:07 ruancomelli

Hi @ruancomelli, thanks for the fix. I'm still getting an error, it's just with a different message now:

Image

tylerlaprade avatar Feb 18 '25 18:02 tylerlaprade

Hi @Hellebore , checking in on this. I couldn't find where this schema is defined in the code, so I didn't open a PR myself. I believe I've identified the issue, though. In the schema, python_version is defined with "type": "union". As per this answer, it should actually be an array of the allowable types. Or it's possible that line can just be omitted and the types will be inferred from the actual union, if so, that's even better because it forces the type to match the actual definition.

tylerlaprade avatar May 12 '25 15:05 tylerlaprade