You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
smart mode seems to depend on the parse_pyproject_toml() returning an empty dict
But parse_pyproject_toml() never returns an empty dict, if pyproject.toml exists, because even if no black key is found in pyproject.toml and the dict would be indeed empty, it adds a target_version key after.
i would make a PR but it seems not straight forward whats the best solution here
Ideas i had:
return also a bool that signals if the black key was found in the config?
pass the smart mode as argument to parse_pyproject_toml(), and return before target version is added
parse the black dict from pyproject into a black key into the config dict, that would allow the following code to check if the black key is empty, but would make code later which access the config a bit less pretty
The text was updated successfully, but these errors were encountered:
lovetox
changed the title
smart mode is broken
smart mode is broken if pyproject.toml exists in project
Sep 5, 2023
smart mode seems to depend on the
parse_pyproject_toml()
returning an empty dictBut
parse_pyproject_toml()
never returns an empty dict, ifpyproject.toml
exists, because even if noblack
key is found inpyproject.toml
and the dict would be indeed empty, it adds atarget_version
key after.i would make a PR but it seems not straight forward whats the best solution here
Ideas i had:
parse_pyproject_toml()
, and return before target version is addedblack
dict from pyproject into ablack
key into the config dict, that would allow the following code to check if the black key is empty, but would make code later which access the config a bit less prettyThe text was updated successfully, but these errors were encountered: