From 6dbe83621ddc2d66aabbd33c45804ca41e69dff3 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Sat, 26 Aug 2023 10:28:10 -0700 Subject: [PATCH] fix: fix PYI024 lint rule violation --- pylib/gyp/msvs_emulation.py | 6 ++++-- pyproject.toml | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pylib/gyp/msvs_emulation.py b/pylib/gyp/msvs_emulation.py index 38fa21dd..d7d37276 100644 --- a/pylib/gyp/msvs_emulation.py +++ b/pylib/gyp/msvs_emulation.py @@ -7,11 +7,11 @@ build systems, primarily ninja. """ -import collections import os import re import subprocess import sys +import typing from gyp.common import OrderedSet import gyp.MSVSUtil @@ -935,7 +935,9 @@ def BuildCygwinBashCommandLine(self, args, path_to_base): ) return cmd - RuleShellFlags = collections.namedtuple("RuleShellFlags", ["cygwin", "quote"]) + class RuleShellFlags(typing.NamedTuple): + cygwin: int + quote: int def GetRuleShellFlags(self, rule): """Return RuleShellFlags about how the given rule should be run. This diff --git a/pyproject.toml b/pyproject.toml index 89cf8958..d7aae5cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,6 @@ ignore = [ "PLR5501", "PLW0603", "PLW2901", - "PYI024", "RUF005", "RUF012", "UP031",