Commit graph

13 commits

Author SHA1 Message Date
Gavin D'souza
c489846547 Merge branch 'develop' into unnecessary_comprehensions 2021-06-11 19:30:23 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Ankush Menat
d7eea22609
chore: misc translation/semgrep fixes 2021-05-12 20:38:19 +05:30
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
Rushabh Mehta
75fe8a615a feat(app): move /desk to /app 2020-11-11 16:31:47 +05:30
Rushabh Mehta
636c662048 [patch] added patch for migration 2017-01-12 15:48:49 +05:30
Rushabh Mehta
cfe44f28d5 [fix] patch + some updates to bot 2016-12-31 11:27:12 +05:30
Rushabh Mehta
a099690e8f Revert "[optimize] remove count(*) from queries" (#2353) 2016-11-22 10:55:13 +05:30
Rushabh Mehta
0ff140fa2b [optimize] remove count(*) from queries 2016-11-21 14:58:18 +05:30
Anand Doshi
cb08274315 [hotfix] is_table -> istable 2016-07-06 19:33:06 +05:30
Rushabh Mehta
f842385611 [fix] with permissions 2016-03-28 16:12:10 +05:30
Rushabh Mehta
9397f8f5e7 [fix] cleanup bot 2016-03-28 15:20:00 +05:30
Rushabh Mehta
a6f8e5b815 [hack] bot.py 2016-03-27 12:34:22 +05:30