Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rich type columns and endpoint kinds for Python model editor #3653

Merged

Conversation

koesie10
Copy link
Member

@koesie10 koesie10 commented Jul 2, 2024

This makes changes to the Python model editor parsing code to incorporate the query changes from github/codeql#15655. These changes consist of:

  • Adding support for reading rich type columns (as implemented by Python: Rich type column in MaD codeql#16490): This makes it possible to replace the columns ["requests", "Member[adapters].Member[HTTPAdapter].Instance.Member[add_headers]"] by ["requests.HTTPAdapter", "Member[add_headers]"].
  • Write rich type columns instead of complex paths. We still retain support for reading non-rich type columns.
  • Use the kind column that has been added in Python: Support model editor codeql#15655 (the last column returned in the query). This makes it possible to properly handle class methods, which we would otherwise need to detect by the name of the method argument rather than just receiving this information from the query.

For more information about the format of Python MaD, see the documentation.

@koesie10 koesie10 marked this pull request as ready for review July 2, 2024 14:08
@koesie10 koesie10 requested a review from a team as a code owner July 2, 2024 14:08
Copy link
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried running this and it worked fine for me, but it's the first time I've used the model editor for python so I'm not very confident I tested it thoroughly.

Looking through the code I can't see anything wrong, but there's a lot going on so it's hard to tell.

LGTM, unless you want to get someone from the python team to also try it out

@koesie10 koesie10 merged commit 9f7f34a into main Jul 4, 2024
26 checks passed
@koesie10 koesie10 deleted the koesie10/python-use-simplified-paths-and-endpoint-kinds branch July 4, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants