Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed some code minimizations for readability

  • Loading branch information...
commit 0ece4c04b28f5d2779fd4e0ad3d6e2211ad13937 1 parent e0bb80f
@volpino authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 euscanwww/djeuscan/managers.py
View
10 euscanwww/djeuscan/managers.py
@@ -30,9 +30,8 @@ def for_method(self, val, last_versions=False):
return for_method
-N_LIST = ['n_packaged', 'n_overlay', 'n_versions']
-
-ANNOTATE_DICT = {name: models.Sum(name) for name in N_LIST}
+ANNOTATE_DICT = {name: models.Sum(name)
+ for name in ['n_packaged', 'n_overlay', 'n_versions']}
class PackageMixin(object):
@@ -41,8 +40,9 @@ class PackageMixin(object):
for_herd = _gen_for_function('herds')
for_category = _gen_for_function('category')
- for name in N_LIST:
- locals()[name] = _gen_n_function(name)
+ n_packaged = _gen_n_function("n_packaged")
+ n_overlay = _gen_n_function("n_overlay")
+ n_versions = _gen_n_function("n_versions")
def n_upstream(self):
return self.n_versions() - self.n_packaged() - self.n_overlay()
Please sign in to comment.
Something went wrong with that request. Please try again.