From 1f22b84d589dac51e6e638aafca1991da084caf2 Mon Sep 17 00:00:00 2001 From: Serg Tereshchenko Date: Fri, 20 May 2022 19:42:25 +0300 Subject: [PATCH] Install pyright with dependencies --- noxfile.py | 7 ------- setup.cfg | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/noxfile.py b/noxfile.py index 7eb2ed9..ceb2f31 100644 --- a/noxfile.py +++ b/noxfile.py @@ -110,13 +110,6 @@ def tests(session: PowerSession, coverage, pkg_specs): # Important: do not surround the command into double quotes as in the shell ! # session.run('python', '-c', 'import os; os.chdir(\'./docs/\'); import %s' % pkg_name) - # Type checking is supported from python 3.7 - if float(session.python) >= 3.7: - try: - session.run2("npm install -g pyright@1.1.247") - except CommandFailed: - print("Failed to install pyright, typing tests would be skipped") - # finally run all tests if not coverage: # install self so that it is recognized by pytest diff --git a/setup.cfg b/setup.cfg index daa4b6d..d80e072 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,10 +45,9 @@ install_requires = tests_require = pytest pytest_cases - # syrupy is used for snapshot testing with pyright, - # pyright must be installed separately, we're not using https://pypi.org/project/pyright/ - # becouse it's just slow wrapper around node version. + # syrupy and pyright is used for testing type correctness. syrupy>2;python_version>'3.6' + pyright;python_version>'3.6' # for some reason these pytest dependencies were not declared in old versions of pytest six;python_version<'3.6' attr;python_version<'3.6'