Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
The unsubscriptable object errors are fixed in Pylint,
pylint-dev/pylint#2416, but the fixed release is
not available via prospector.
  • Loading branch information
pgjones committed Feb 15, 2020
1 parent 10106ea commit f2c12de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .prospector.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pylint:
disable:
- cyclic-import
- no-else-break
- no-else-continue
- unused-argument
- useless-object-inheritance

Expand Down
2 changes: 1 addition & 1 deletion compliance/run-autobahn-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def main() -> None:
sys.exit(2)
coverage_settings = {"coveragerc": "../.coveragerc"}
try:
import wsproto
import wsproto # pylint: disable=import-outside-toplevel
except ImportError:
say("wsproto must be on python path -- set PYTHONPATH or install it")
sys.exit(2)
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ commands =

[testenv:lint]
basepython = python3.6
# pylint==2.1.1 required due to prospector bug, see https://github.com/PyCQA/prospector/pull/309
deps =
prospector==1.1.7
prospector
commands = prospector

[testenv:docs]
Expand Down
4 changes: 2 additions & 2 deletions wsproto/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Message(Event, Generic[T]):


@dataclass(frozen=True)
class TextMessage(Message[str]):
class TextMessage(Message[str]): # pylint: disable=unsubscriptable-object
"""This event is fired when a data frame with TEXT payload is received.
Fields:
Expand All @@ -240,7 +240,7 @@ class TextMessage(Message[str]):


@dataclass(frozen=True)
class BytesMessage(Message[bytes]):
class BytesMessage(Message[bytes]): # pylint: disable=unsubscriptable-object
"""This event is fired when a data frame with BINARY payload is
received.
Expand Down

0 comments on commit f2c12de

Please sign in to comment.