From b0f08f05ad185273becc0344422a8bc8e63d19f6 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Wed, 7 Jun 2023 08:59:48 -0400 Subject: [PATCH] [pyright updated to 1.1.312] Update Version (#183) * Pyright NPM Package update to 1.1.312 * Fix lint --------- Co-authored-by: RobertCraigie --- README.md | 2 +- pyright/_version.py | 4 ++-- pyright/node.py | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 593c5d5..f43d766 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ You can also setup pyright to run automatically before each commit by setting up ```yaml repos: - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.311 + rev: v1.1.312 hooks: - id: pyright ``` diff --git a/pyright/_version.py b/pyright/_version.py index 925da61..932697f 100644 --- a/pyright/_version.py +++ b/pyright/_version.py @@ -1,2 +1,2 @@ -__version__ = '1.1.311' -__pyright_version__ = '1.1.311' +__version__ = '1.1.312' +__pyright_version__ = '1.1.312' diff --git a/pyright/node.py b/pyright/node.py index 3f1a283..5d74fb6 100644 --- a/pyright/node.py +++ b/pyright/node.py @@ -9,7 +9,7 @@ import platform import subprocess from functools import lru_cache -from typing import Dict, Mapping, Tuple, Optional, Union, Any +from typing import Dict, Mapping, Tuple, Optional, Union, Any, cast from pathlib import Path from . import errors @@ -112,7 +112,10 @@ def run( raise RuntimeError(f'Unknown strategy: {binary.strategy}') log.debug('Running node command with args: %s', node_args) - return subprocess.run(node_args, env=env, **kwargs) + return cast( + 'subprocess.CompletedProcess[str] | subprocess.CompletedProcess[bytes]', + subprocess.run(node_args, env=env, **kwargs), + ) def version(target: Target) -> Tuple[int, ...]: