mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Python: Use django View instead of MethodView
Due to the 'only model most specific spec' logic highlighted in previous commit, I'm changing away from MethodView/View, and use Django view instead. In practice this shouldn't matter at all, but for writing tests it would have been a nice fix to only have the "same name but more specific" logic apply when it's the same _definition_ location. We used to have this information available, but right now we don't... so instead of spending a lot of time rewriting the core library, I simply used a different class :D :O :(
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
| Django.Views.View~Subclass | find_subclass_test | Member[View] |
|
||||
| Django.Views.View~Subclass | find_subclass_test | Member[clash] |
|
||||
| flask.MethodView~Subclass | find_subclass_test | Member[C] |
|
||||
| flask.MethodView~Subclass | find_subclass_test | Member[MethodView] |
|
||||
| flask.MethodView~Subclass | find_subclass_test | Member[clash] |
|
||||
| flask.View~Subclass | find_subclass_test | Member[A] |
|
||||
| flask.View~Subclass | find_subclass_test | Member[B] |
|
||||
| flask.View~Subclass | find_subclass_test | Member[ViewAliasInExcept] |
|
||||
@@ -8,4 +8,5 @@
|
||||
| flask.View~Subclass | find_subclass_test | Member[ViewAlias] |
|
||||
| flask.View~Subclass | find_subclass_test | Member[View] |
|
||||
| flask.View~Subclass | find_subclass_test | Member[clash3] |
|
||||
| flask.View~Subclass | find_subclass_test | Member[clash] |
|
||||
| flask.View~Subclass | find_subclass_test | Member[complete_module_alias] |
|
||||
|
||||
@@ -19,20 +19,20 @@ except:
|
||||
|
||||
|
||||
if cond:
|
||||
from flask.views import View as clash # $ MISSING
|
||||
from flask.views import View as clash
|
||||
else:
|
||||
from flask.views import MethodView as clash # $ SPURIOUS: MethodView
|
||||
from django.views.generic import View as clash # $ SPURIOUS: View=Django.Views.View~Subclass
|
||||
|
||||
if cond:
|
||||
from flask.views import View as clash2 # $ MISSING
|
||||
else:
|
||||
from flask.views import MethodView as clash2 # $ MISSING
|
||||
from django.views.generic import View as clash2 # $ MISSING
|
||||
print(clash2)
|
||||
|
||||
if cond:
|
||||
from flask.views import View as clash3
|
||||
else:
|
||||
from flask.views import MethodView as clash3 # $ MISSING
|
||||
from django.views.generic import View as clash3 # $ MISSING
|
||||
print(clash3)
|
||||
|
||||
import flask.views as containing_module_alias # $ MISSING
|
||||
|
||||
Reference in New Issue
Block a user