diff options
| author | 2021-08-19 21:51:07 +0000 | |
|---|---|---|
| committer | 2021-08-19 21:51:07 +0000 | |
| commit | 13329482cfffe017a560c04c96842dd9f103a4a1 (patch) | |
| tree | a5b6ef7138b6c5d82bffb40e61e601ef8e5d3452 | |
| parent | 94768194b7555b7d52f41f77175c8446a410f7b2 (diff) | |
| parent | f6cda869155848a4346d80bab747af6e9f284084 (diff) | |
Merge "Revert "Revert "Apply pylint to cc/symbolfile""" am: 99d5a0f5c9 am: bc3bbf81bc am: afa8400906 am: f6cda86915
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1802996
Change-Id: I80bee5511dfb5b4a2a3d01c598220ef8fefeba0e
| -rw-r--r-- | cc/symbolfile/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/symbolfile/__init__.py b/cc/symbolfile/__init__.py index 31c444385..f8d18414c 100644 --- a/cc/symbolfile/__init__.py +++ b/cc/symbolfile/__init__.py @@ -329,7 +329,7 @@ class SymbolFileParser: def parse(self) -> List[Version]: """Parses the symbol file and returns a list of Version objects.""" versions = [] - while self.next_line() != '': + while self.next_line(): assert self.current_line is not None if '{' in self.current_line: versions.append(self.parse_version()) @@ -376,7 +376,7 @@ class SymbolFileParser: symbols: List[Symbol] = [] global_scope = True cpp_symbols = False - while self.next_line() != '': + while self.next_line(): if '}' in self.current_line: # Line is something like '} BASE; # tags'. Both base and tags # are optional here. @@ -428,11 +428,11 @@ class SymbolFileParser: A return value of '' indicates EOF. """ line = self.input_file.readline() - while line.strip() == '' or line.strip().startswith('#'): + while not line.strip() or line.strip().startswith('#'): line = self.input_file.readline() # We want to skip empty lines, but '' indicates EOF. - if line == '': + if not line: break self.current_line = line return self.current_line |