File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
lib/semmle/python/frameworks Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 99private import python
1010private import semmle.python.Concepts
1111private import semmle.python.ApiGraphs
12+ private import semmle.python.frameworks.data.ModelsAsData
1213
1314/**
15+ * INTERNAL: Do not use.
16+ *
1417 * Provides models for the `pycurl` PyPI package.
1518 *
1619 * See
1720 * - https://pypi.org/project/pycurl/
1821 * - https://pycurl.io/docs/latest/
1922 */
20- private module Pycurl {
23+ module Pycurl {
2124 /**
2225 * Provides models for the `pycurl.Curl` class
2326 *
2427 * See https://pycurl.io/docs/latest/curl.html.
2528 */
2629 module Curl {
2730 /** Gets a reference to the `pycurl.Curl` class. */
28- private API:: Node classRef ( ) { result = API:: moduleImport ( "pycurl" ) .getMember ( "Curl" ) }
31+ API:: Node classRef ( ) {
32+ result = API:: moduleImport ( "pycurl" ) .getMember ( "Curl" )
33+ or
34+ result = ModelOutput:: getATypeNode ( "pycurl.Curl~Subclass" ) .getASubclass * ( )
35+ }
2936
3037 /** Gets a reference to an instance of `pycurl.Curl`. */
3138 private API:: Node instance ( ) { result = classRef ( ) .getReturn ( ) }
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ private import semmle.python.frameworks.Httpx
2222private import semmle.python.frameworks.Invoke
2323private import semmle.python.frameworks.MarkupSafe
2424private import semmle.python.frameworks.Multidict
25+ private import semmle.python.frameworks.Pycurl
2526import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
2627
2728class FlaskViewClasses extends FindSubclassesSpec {
@@ -317,6 +318,12 @@ class Multidict extends FindSubclassesSpec {
317318 override API:: Node getAlreadyModeledClass ( ) { result = Multidict:: MultiDictProxy:: classRef ( ) }
318319}
319320
321+ class PyCurl extends FindSubclassesSpec {
322+ PyCurl ( ) { this = "pycurl.Curl~Subclass" }
323+
324+ override API:: Node getAlreadyModeledClass ( ) { result = Pycurl:: Curl:: classRef ( ) }
325+ }
326+
320327bindingset [ fullyQualified]
321328predicate fullyQualifiedToYamlFormat ( string fullyQualified , string type2 , string path ) {
322329 exists ( int firstDot | firstDot = fullyQualified .indexOf ( "." , 0 , 0 ) |
You can’t perform that action at this time.
0 commit comments