Skip to content

Commit

Permalink
Silence pylint error for class inheriting from NamedTuple
Browse files Browse the repository at this point in the history
Python 3.9 changed typing.NamedTuple to be a function that can be
inherited from. This trips up pylint, cf.
pylint-dev/pylint#3876.
  • Loading branch information
simu committed Oct 19, 2020
1 parent 3155ccc commit 2dc1f38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions commodore/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
from git import Repo


# Python 3.9 changed typing.NamedTuple to be a function that can be inherited
# from. This trips up pylint, cf. https://github.com/PyCQA/pylint/issues/3876.
# pylint: disable=inherit-non-class
# pylint: disable=too-few-public-methods
class Component(NamedTuple):
name: str
repo: Repo
Expand Down

0 comments on commit 2dc1f38

Please sign in to comment.