Skip to content

Commit

Permalink
fFix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
paulacamargo25 committed Jan 13, 2023
1 parent 213437d commit c2987c1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/test/python_tests/test_linting.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def _handler(params):
actual = params
done.set()

ls_session.set_notification_callback(session.PUBLISH_DIAGNOSTICS, _handler)
ls_session.set_notification_callback(
session.PUBLISH_DIAGNOSTICS, _handler)

ls_session.notify_did_open(
{
Expand Down Expand Up @@ -109,7 +110,8 @@ def _handler(params):
actual = params
done.set()

ls_session.set_notification_callback(session.PUBLISH_DIAGNOSTICS, _handler)
ls_session.set_notification_callback(
session.PUBLISH_DIAGNOSTICS, _handler)

ls_session.notify_did_save(
{
Expand Down Expand Up @@ -185,7 +187,8 @@ def _handler(params):
actual = params
done.set()

ls_session.set_notification_callback(session.PUBLISH_DIAGNOSTICS, _handler)
ls_session.set_notification_callback(
session.PUBLISH_DIAGNOSTICS, _handler)

ls_session.notify_did_open(
{
Expand Down Expand Up @@ -231,7 +234,7 @@ def _handler(params):
@pytest.mark.parametrize("lint_code", ["W0611", "unused-import", "warning"])
def test_severity_setting(lint_code):
"""Test to ensure linting on file open."""
contents = TEST_FILE_PATH.read_text()
contents = TEST_FILE_PATH.read_text(encoding="utf-8")

actual = []
with session.LspSession() as ls_session:
Expand All @@ -246,7 +249,8 @@ def _handler(params):
actual = params
done.set()

ls_session.set_notification_callback(session.PUBLISH_DIAGNOSTICS, _handler)
ls_session.set_notification_callback(
session.PUBLISH_DIAGNOSTICS, _handler)

ls_session.notify_did_open(
{
Expand Down

0 comments on commit c2987c1

Please sign in to comment.