From eec1388159ecbb5374fd8cad67ff7b065b1051d9 Mon Sep 17 00:00:00 2001 From: valrus Date: Mon, 12 Aug 2024 08:33:44 -0700 Subject: [PATCH] fix linter issues --- pylsp_jsonrpc/streams.py | 5 +++-- test/test_streams.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pylsp_jsonrpc/streams.py b/pylsp_jsonrpc/streams.py index 1080deb..aa74a1d 100644 --- a/pylsp_jsonrpc/streams.py +++ b/pylsp_jsonrpc/streams.py @@ -86,8 +86,9 @@ def __init__(self, wfile, **json_dumps_args): self._wfile_lock = threading.Lock() if 'orjson' in sys.modules and json_dumps_args.pop('sort_keys'): - # orjson needs different option handling - self._json_dumps_args = {'option': json.OPT_SORT_KEYS} + # orjson needs different option handling; + # pylint has an erroneous error here https://github.com/pylint-dev/pylint/issues/9762 + self._json_dumps_args = {'option': json.OPT_SORT_KEYS} # pylint: disable=maybe-no-member self._json_dumps_args.update(**json_dumps_args) else: self._json_dumps_args = json_dumps_args diff --git a/test/test_streams.py b/test/test_streams.py index c71c912..d97b3a2 100644 --- a/test/test_streams.py +++ b/test/test_streams.py @@ -7,8 +7,8 @@ import datetime import sys from unittest import mock -import pytest import json +import pytest from pylsp_jsonrpc.streams import JsonRpcStreamReader, JsonRpcStreamWriter