forked from mirrors/bookwyrm
Add .pylintrc with fixes for new pylint version
This commit is contained in:
parent
7905be7de2
commit
6d6ab9a531
4 changed files with 10 additions and 4 deletions
6
.pylintrc
Normal file
6
.pylintrc
Normal file
|
@ -0,0 +1,6 @@
|
|||
[MAIN]
|
||||
ignore=migrations
|
||||
load-plugins=pylint.extensions.no_self_use
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
disable=E1101,E1135,E1136,R0903,R0901,R0902,W0707,W0511,W0406,R0401,R0801,C3001
|
|
@ -229,7 +229,7 @@ class Openlibrary(TestCase):
|
|||
status=200,
|
||||
)
|
||||
with patch(
|
||||
"bookwyrm.connectors.openlibrary.Connector." "get_authors_from_data"
|
||||
"bookwyrm.connectors.openlibrary.Connector.get_authors_from_data"
|
||||
) as mock:
|
||||
mock.return_value = []
|
||||
result = self.connector.create_edition_from_data(work, self.edition_data)
|
||||
|
|
|
@ -195,7 +195,7 @@ class ImportJob(TestCase):
|
|||
) as search:
|
||||
search.return_value = result
|
||||
with patch(
|
||||
"bookwyrm.connectors.openlibrary.Connector." "get_authors_from_data"
|
||||
"bookwyrm.connectors.openlibrary.Connector.get_authors_from_data"
|
||||
):
|
||||
book = item.get_book_from_identifier()
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ http://www.fish.com/"""
|
|||
result = views.status.to_markdown(text)
|
||||
self.assertEqual(
|
||||
result,
|
||||
'<p><em>hi</em> and <a href="http://fish.com">fish.com</a> ' "is rad</p>",
|
||||
'<p><em>hi</em> and <a href="http://fish.com">fish.com</a> is rad</p>',
|
||||
)
|
||||
|
||||
def test_to_markdown_detect_url(self, *_):
|
||||
|
@ -297,7 +297,7 @@ http://www.fish.com/"""
|
|||
"""this is mostly handled in other places, but nonetheless"""
|
||||
text = "[hi](http://fish.com) is <marquee>rad</marquee>"
|
||||
result = views.status.to_markdown(text)
|
||||
self.assertEqual(result, '<p><a href="http://fish.com">hi</a> ' "is rad</p>")
|
||||
self.assertEqual(result, '<p><a href="http://fish.com">hi</a> is rad</p>')
|
||||
|
||||
def test_delete_status(self, mock, *_):
|
||||
"""marks a status as deleted"""
|
||||
|
|
Loading…
Reference in a new issue