From cc52de8c3579633a7285434a03575f10d88bf7ca Mon Sep 17 00:00:00 2001 From: Mayank Patibandla <34776435+mayankpatibandla@users.noreply.github.com> Date: Mon, 4 Mar 2024 23:31:53 -0500 Subject: [PATCH] Fix R1718 --- .pylintrc | 3 +-- pros/conductor/project/__init__.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index b0659527..6a02e11c 100644 --- a/.pylintrc +++ b/.pylintrc @@ -28,7 +28,6 @@ # C0103: Variable name doesn't conform to naming style # R1732: Consider using with # W1514: Using open without explicitly specifying an encoding -# R1718: Consider using set comprehension # E1101: Nonexistent member # E0401: Unable to import # W0212: Access to a protected member @@ -74,7 +73,7 @@ max-line-length = 120 disable = C0114, C0115, C0116, R0903, C0415, R1705, R0913, W1203, R1729, E1120, E1123, C0209, R1710, W0621, C0121, W0614, W0401, W1202, C0117, W0718, R0205, R0402, R0914, R1725, R1735, C0411, W0237, W0702, W0223, W0613, - W0108, R0912, R0911, W0511, E1136, R0902, W0611, C0412, C0103, C0301, R1732, R0915, W1514, R1718, + W0108, R0912, R0911, W0511, E1136, R0902, W0611, C0412, C0103, C0301, R1732, R0915, W1514, E1101, R1734, W1201, E0401, W0212, R0904, W0101, C0302, E0110, W0603, R0401, C0303, W4902 diff --git a/pros/conductor/project/__init__.py b/pros/conductor/project/__init__.py index fbfd0d7f..2ea4812c 100644 --- a/pros/conductor/project/__init__.py +++ b/pros/conductor/project/__init__.py @@ -360,7 +360,7 @@ def libscanbuild_capture(args: argparse.Namespace) -> Tuple[int, Iterable[Compil if copy: cxx_sysroot_includes.append(f'-isystem{line}') new_entries, entries = itertools.tee(entries, 2) - new_sources = set([e.source for e in entries]) + new_sources = {e.source for e in entries} if not cdb_file: cdb_file = os.path.join(self.directory, 'compile_commands.json') if isinstance(cdb_file, str) and os.path.isfile(cdb_file):