From 2d2944d18683130bdf69f3c2350e0d22ee70f2d7 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 12 Jan 2022 13:53:34 +0100 Subject: [PATCH] Enable `deprecated-typing-alias` check [pylint] (#63935) --- .core_files.yaml | 2 +- homeassistant/components/harmony/subscriber.py | 4 ++++ pyproject.toml | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.core_files.yaml b/.core_files.yaml index 137bd44292b..c6cd987616a 100644 --- a/.core_files.yaml +++ b/.core_files.yaml @@ -6,7 +6,7 @@ core: &core - homeassistant/helpers/* - homeassistant/package_constraints.txt - homeassistant/util/* - - pyproject.yaml + - pyproject.toml - requirements.txt - setup.cfg diff --git a/homeassistant/components/harmony/subscriber.py b/homeassistant/components/harmony/subscriber.py index b2652cc43d1..f71b486fd16 100644 --- a/homeassistant/components/harmony/subscriber.py +++ b/homeassistant/components/harmony/subscriber.py @@ -2,6 +2,10 @@ import asyncio import logging + +# pylint: disable-next=deprecated-typing-alias +# Issue with Python 3.9.0 and 3.9.1 with collections.abc.Callable +# https://bugs.python.org/issue42965 from typing import Any, Callable, NamedTuple, Optional from homeassistant.core import callback diff --git a/pyproject.toml b/pyproject.toml index a2d7a8721b4..4f46f018546 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,6 @@ good-names = [ # Enable once current issues are fixed: # consider-using-namedtuple-or-dataclass (Pylint CodeStyle extension) # consider-using-assignment-expr (Pylint CodeStyle extension) -# deprecated-typing-alias (temporarily while updating code to Python 3.9) disable = [ "format", "abstract-class-little-used", @@ -102,7 +101,6 @@ disable = [ "consider-using-f-string", "consider-using-namedtuple-or-dataclass", "consider-using-assignment-expr", - "deprecated-typing-alias", ] enable = [ #"useless-suppression", # temporarily every now and then to clean them up