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
The best idea I have so far is to define subclasses for GenerateToolLockfileSentinel, like GeneratePythonToolLockfileSentinel. Then, we can check issubclass()... :/
A more elegant solution might be if we could inspect the rule graph to see if the rule returns the type GeneratePythonLockfile. I don't think that's currently possible though.
…bclasses (#16449)
Closes#16443, which is necessary for the per-resolve config project from https://docs.google.com/document/d/1HAvpSNvNAHreFfvTAXavZGka-A3WWvPuH0sMjGUCo48/edit# to work properly. See #16420 (comment).
As discussed on the ticket, this is not a very elegant solution. But we don't have the rule graph introspection mechanism necessary to automagically figure out what type each tool is, and that also seems brittle.
As explained in this PR's updated docs, plugin authors don't have to technically make this change.
[ci skip-rust]
[ci skip-build-wheels]
cczona
pushed a commit
to cczona/pants
that referenced
this issue
Sep 1, 2022
…bclasses (pantsbuild#16449)
Closespantsbuild#16443, which is necessary for the per-resolve config project from https://docs.google.com/document/d/1HAvpSNvNAHreFfvTAXavZGka-A3WWvPuH0sMjGUCo48/edit# to work properly. See pantsbuild#16420 (comment).
As discussed on the ticket, this is not a very elegant solution. But we don't have the rule graph introspection mechanism necessary to automagically figure out what type each tool is, and that also seems brittle.
As explained in this PR's updated docs, plugin authors don't have to technically make this change.
[ci skip-rust]
[ci skip-build-wheels]
See #16420 (comment).
The best idea I have so far is to define subclasses for
GenerateToolLockfileSentinel
, likeGeneratePythonToolLockfileSentinel
. Then, we can checkissubclass()
... :/A more elegant solution might be if we could inspect the rule graph to see if the rule returns the type
GeneratePythonLockfile
. I don't think that's currently possible though.pants/src/python/pants/backend/python/lint/black/subsystem.py
Lines 108 to 114 in add0956
The text was updated successfully, but these errors were encountered: