File tree Expand file tree Collapse file tree
lib/semmle/python/frameworks Expand file tree Collapse file tree 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 `urllib3` PyPI package.
1518 *
1619 * See
1720 * - https://pypi.org/project/urllib3/
1821 * - https://urllib3.readthedocs.io/en/stable/reference/
1922 */
20- private module Urllib3 {
23+ module Urllib3 {
2124 /**
2225 * Provides models for the `urllib3.request.RequestMethods` class and subclasses, such
2326 * as the `urllib3.PoolManager` class
@@ -30,7 +33,7 @@ private module Urllib3 {
3033 */
3134 module PoolManager {
3235 /** Gets a reference to the `urllib3.PoolManager` class. */
33- private API:: Node classRef ( ) {
36+ API:: Node classRef ( ) {
3437 result =
3538 API:: moduleImport ( "urllib3" )
3639 .getMember ( [ "PoolManager" , "ProxyManager" , "HTTPConnectionPool" , "HTTPSConnectionPool" ] )
@@ -40,6 +43,8 @@ private module Urllib3 {
4043 .getMember ( "request" )
4144 .getMember ( "RequestMethods" )
4245 .getASubclass + ( )
46+ or
47+ result = ModelOutput:: getATypeNode ( "urllib3.PoolManager~Subclass" ) .getASubclass * ( )
4348 }
4449
4550 /**
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ private import semmle.python.frameworks.Pycurl
2626private import semmle.python.frameworks.RestFramework
2727private import semmle.python.frameworks.SqlAlchemy
2828private import semmle.python.frameworks.Tornado
29+ private import semmle.python.frameworks.Urllib3
2930import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
3031
3132class FlaskViewClasses extends FindSubclassesSpec {
@@ -397,6 +398,12 @@ class TornadoRequest extends FindSubclassesSpec {
397398 }
398399}
399400
401+ class Urllib3PoolManager extends FindSubclassesSpec {
402+ Urllib3PoolManager ( ) { this = "urllib3.PoolManager~Subclass" }
403+
404+ override API:: Node getAlreadyModeledClass ( ) { result = Urllib3:: PoolManager:: classRef ( ) }
405+ }
406+
400407bindingset [ fullyQualified]
401408predicate fullyQualifiedToYamlFormat ( string fullyQualified , string type2 , string path ) {
402409 exists ( int firstDot | firstDot = fullyQualified .indexOf ( "." , 0 , 0 ) |
You can’t perform that action at this time.
0 commit comments