Merge pull request #217763 from mweinelt/hass-stubs

Typing stubs for home-assistant type checks
This commit is contained in:
Martin Weinelt 2023-02-23 21:31:23 +00:00 committed by GitHub
commit 96a3979a7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, mypy
}:
buildPythonPackage rec {
pname = "voluptuous-stubs";
version = "0.1.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-cPscCIJC8g4RAjJStWSM13+DH2ks2RDI+XE8wTXPjMg=";
};
nativeBuildInputs = [
mypy
];
pythonImportsCheck = [
"voluptuous-stubs"
];
doCheck = false;
meta = with lib; {
description = "Typing stubs for voluptuous";
homepage = "https://github.com/ryanwang520/voluptuous-stubs";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -0,0 +1,38 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, home-assistant
}:
buildPythonPackage rec {
pname = "homeassistant-stubs";
version = "2023.2.5";
format = "pyproject";
src = fetchFromGitHub {
owner = "KapJI";
repo = "homeassistant-stubs";
rev = "refs/tags/${version}";
hash = "sha256-MQYk4DWvmqtPl00L1c00JclKkTZe9EYMrm/LucUHBE0=";
};
nativeBuildInputs = [
poetry-core
home-assistant
];
pythonImportsCheck = [
"homeassistant-stubs"
];
doCheck = false;
meta = with lib; {
description = "Typing stubs for Home Assistant Core";
homepage = "https://github.com/KapJI/homeassistant-stubs";
changelog = "https://github.com/KapJI/homeassistant-stubs/releases/tag/${version}";
license = licenses.mit;
maintainers = teams.home-assistant.members;
};
}

View File

@ -4378,6 +4378,8 @@ self: super: with self; {
homeassistant-pyozw = callPackage ../development/python-modules/homeassistant-pyozw { };
homeassistant-stubs = callPackage ../servers/home-assistant/stubs.nix { };
homeconnect = callPackage ../development/python-modules/homeconnect { };
homematicip = callPackage ../development/python-modules/homematicip { };
@ -12181,6 +12183,8 @@ self: super: with self; {
voluptuous-serialize = callPackage ../development/python-modules/voluptuous-serialize { };
voluptuous-stubs = callPackage ../development/python-modules/voluptuous-stubs { };
volvooncall = callPackage ../development/python-modules/volvooncall { };
vowpalwabbit = callPackage ../development/python-modules/vowpalwabbit { };