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

@@ -56,7 +56,7 @@ class StudioApiFixture:
Log in as a staff user, then return the cookies for the session (as a dict)
Raises a `StudioApiLoginError` if the login fails.
"""
return {key: val for key, val in self.session.cookies.items()} # lint-amnesty, pylint: disable=unnecessary-comprehension
return dict(self.session.cookies.items())
@lazy
def headers(self):

View File

@@ -61,7 +61,7 @@ class ConfigModelFixture:
Log in as a staff user, then return the cookies for the session (as a dict)
Raises a `ConfigModelFixtureError` if the login fails.
"""
return {key: val for key, val in self.session.cookies.items()} # lint-amnesty, pylint: disable=unnecessary-comprehension
return dict(self.session.cookies.items())
@lazy
def headers(self):