================
@@ -27,33 +27,69 @@
 
 
 class LintArgs:
-    start_rev: str
-    end_rev: str
-    repo: str
-    changed_files: Sequence[str]
-    token: str
-    verbose: bool = True
-    issue_number: int = 0
-    build_path: str = "build"
-    clang_tidy_binary: str = "clang-tidy"
+    __start_rev: str
+    __end_rev: str
+    __repo: str
+    __changed_files: List[str]
+    __token: str
+    __verbose: bool
+    __issue_number: int
+    __build_path: str
+    __clang_tidy_binary: str
 
     def __init__(self, args: argparse.Namespace) -> None:
         if not args is None:
-            self.start_rev = args.start_rev
-            self.end_rev = args.end_rev
-            self.repo = args.repo
-            self.token = args.token
-            self.changed_files = (
+            self.__start_rev = args.start_rev
+            self.__end_rev = args.end_rev
+            self.__repo = args.repo
+            self.__token = args.token
+            self.__changed_files = (
                 args.changed_files.split(",") if args.changed_files else []
             )
-            self.issue_number = args.issue_number
-            self.verbose = args.verbose
-            self.build_path = args.build_path
-            self.clang_tidy_binary = args.clang_tidy_binary
+            self.__issue_number = args.issue_number
+            self.__verbose = args.verbose
+            self.__build_path = args.build_path
+            self.__clang_tidy_binary = args.clang_tidy_binary
+
+    @property
+    def start_rev(self) -> str:
+        return self.__start_rev
+
+    @property
+    def end_rev(self) -> str:
+        return self.__end_rev
+
+    @property
+    def repo(self) -> str:
+        return self.__repo
+
+    @property
+    def changed_files(self) -> List[str]:
----------------
EugeneZelenko wrote:

In this particular place it may make sense to return `Sequence`, if 
`self.__changed_files` should be invariant for external users.

https://github.com/llvm/llvm-project/pull/168827
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to