Skip to content

Conversation

RasmusWL
Copy link
Member

@RasmusWL RasmusWL commented Jun 8, 2020

It's hard to show in a test, but the following test gave results for Maybe and Maybe_not under Python 3.8, saying that they is exported by __all__ but is not defined.

from enum import IntEnum
IntEnum._convert(
'Maybe',
__name__,
lambda C: C.isupper() and C.startswith('AF_'))
__all__ = [ "Maybe", "Maybe_not" ]

This PR fixes the problem, and adds a case of points-to regression that caused the query to not just work out of the box.

@RasmusWL RasmusWL added the Python label Jun 8, 2020
@RasmusWL RasmusWL requested a review from a team as a code owner June 8, 2020 13:18
Copy link
Contributor

@tausbn tausbn left a comment

Choose a reason for hiding this comment

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

This looks good. I have a few small suggestions (and a comment) but apart from that it looks ready to merge. 👍

Co-authored-by: Taus <tausbn@gmail.com>
@semmle-qlci semmle-qlci merged commit f7c6b13 into github:master Jun 10, 2020
@RasmusWL RasmusWL deleted the python-handle-3.8-enum-convert branch June 10, 2020 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants