mirror of
https://github.com/django/django.git
synced 2025-08-20 02:30:24 +00:00
Fixed "redefinition of unused 'foo' from line X" pyflakes warnings.
This commit is contained in:
parent
cec11a3336
commit
adedc31072
12 changed files with 27 additions and 34 deletions
|
@ -53,11 +53,11 @@ class ProjectState(object):
|
|||
@classmethod
|
||||
def from_app_cache(cls, app_cache):
|
||||
"Takes in an AppCache and returns a ProjectState matching it"
|
||||
models = {}
|
||||
app_models = {}
|
||||
for model in app_cache.get_models():
|
||||
model_state = ModelState.from_model(model)
|
||||
models[(model_state.app_label, model_state.name.lower())] = model_state
|
||||
return cls(models)
|
||||
app_models[(model_state.app_label, model_state.name.lower())] = model_state
|
||||
return cls(app_models)
|
||||
|
||||
def __eq__(self, other):
|
||||
if set(self.models.keys()) != set(other.models.keys()):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue