repoview: use class literal for creating filteredchangelog
The type name is constant, so we don't need to create it dynamically
using type(). As suggested by Yuya.
Differential Revision: https://phab.mercurial-scm.org/D7364
--- a/mercurial/repoview.py Thu Nov 07 14:59:11 2019 -0500
+++ b/mercurial/repoview.py Fri Nov 08 11:23:22 2019 -0800
@@ -227,9 +227,10 @@
cl = copy.copy(unfichangelog)
cl.filteredrevs = filteredrevs
- cl.__class__ = type(
- 'filteredchangelog', (filteredchangelogmixin, cl.__class__), {}
- )
+ class filteredchangelog(filteredchangelogmixin, cl.__class__):
+ pass
+
+ cl.__class__ = filteredchangelog
return cl