style: code cleanups from Steven Burch (#29292)

* chore: update deprecated import from collections

* chore: remove outdated imports from markdown library

as it hasn't been supported since 2.0.3 and we're on 3.x.
This was deprecated at least as early as 2012!

* docs: add docstring and remove lint-amnesty to markdown plugin

* chore: remove deprecated etree import

* style: remove unnecessary-comprehension for sets

* style: resolve a number of amnestied pylint complaints

Co-authored-by: stvn <stvn@mit.edu>
This commit is contained in:
Ned Batchelder
2021-11-10 07:11:57 -08:00
committed by GitHub
parent 1d2319b42a
commit d9dd10dc97
30 changed files with 71 additions and 88 deletions

View File

@@ -255,10 +255,7 @@ class CourseQualityView(DeveloperErrorViewMixin, GenericAPIView):
len(cls._get_children(block)) == 0
)
return [
block for block in # lint-amnesty, pylint: disable=unnecessary-comprehension
traverse_pre_order(unit, cls._get_visible_children, leaf_filter)
]
return list(traverse_pre_order(unit, cls._get_visible_children, leaf_filter))
def _stats_dict(self, data): # lint-amnesty, pylint: disable=missing-function-docstring
if not data: