Make Ruff an optional dependency to avoid upper bound restriction #998
Replies: 2 comments 8 replies
-
|
I see here why Ruff is a hard dependency: https://github.com/openapi-generators/openapi-python-client?tab=readme-ov-file#installation
It might be nice to make this optional? I do see the convenience, but for example, on our project we manage Ruff format ourselves as do perhaps others? And then if it were made optional the Ruff version wouldn't need to be restricted by |
Beta Was this translation helpful? Give feedback.
-
|
I know it's not as good as optional, but starting with 0.27 there will be no upper bound of Ruff anymore, since I think I reduced the risk of generation breaking on every major version of Ruff. If we can get the Jinja templates into a nice enough state that the code they create is tolerable without Ruff, I will make it optional. Easier said than done, though, since whitespace is extra hard with those 😓 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently,
ruffis listed as a hard dependency ofopenapi-python-client:openapi-python-client/pyproject.toml
Line 17 in a73dfd4
But this means that if a user includes
openapi-python-clientas their own dev dependency (in order to lock its version with Poetry, for example), they can't upgrade to newer Ruff releases untilopenapi-python-clientdoes. This is made worse if they need to pin to an older version ofopenapi-python-clientdue an incompatibility that arises (e.g., #926).We need to pin our
openapi-python-clientrather than usingpipxto install it (as recommended in the README), because we need all developers on the team to always get the correct version that we've tested, thusopenapi-python-client's dependencies will influence our project's dependencies.Could
ruffbe made anextrasso that it's optional?Beta Was this translation helpful? Give feedback.
All reactions