diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2021-11-08 13:22:07 -0500 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2021-11-08 13:22:07 -0500 |
| commit | f9851f115b501add28b5b849821dd0525d82e960 (patch) | |
| tree | 224b1e722ebf093740bf28962e3fba6de5fb654d /python | |
| parent | a98466927f39c3a413583f0d4c99aca33a2bacb3 (diff) | |
add pep 484 and 561 compliance, fixes #2747
Diffstat (limited to 'python')
| -rw-r--r-- | python/bncompleter.py | 6 | ||||
| -rw-r--r-- | python/mediumlevelil.py | 4 | ||||
| -rw-r--r-- | python/py.typed | 0 | ||||
| -rw-r--r-- | python/types.py | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/python/bncompleter.py b/python/bncompleter.py index 0063bf5f..ba012a2a 100644 --- a/python/bncompleter.py +++ b/python/bncompleter.py @@ -146,10 +146,10 @@ class Completer: word = word + ' ' matches.append(word) #Not sure why in the console builtins becomes a dict but this works for now. - if hasattr(__builtins__, '__dict__'): # type: ignore remove this ignore > pyright 1.1.149 - builtins = __builtins__.__dict__ # type: ignore remove this ignore > pyright 1.1.149 + if hasattr(__builtins__, '__dict__'): # type: ignore # remove this ignore > pyright 1.1.149 + builtins = __builtins__.__dict__ # type: ignore # remove this ignore > pyright 1.1.149 else: - builtins = __builtins__ # type: ignore remove this ignore > pyright 1.1.149 + builtins = __builtins__ # type: ignore # remove this ignore > pyright 1.1.149 for nspace in [self.namespace, builtins]: for word, val in nspace.items(): if word[:n] == text and word not in seen: diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index 6c75e7cc..c4e77af2 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -1886,7 +1886,7 @@ class MediumLevelILSet_var_ssa_field(MediumLevelILInstruction, SetVar, SSA): @property def vars_read(self) -> List[SSAVariable]: - return [self.prev, *self.src.vars_read] # type: ignore we're guaranteed not to return non-SSAVariables here + return [self.prev, *self.src.vars_read] # type: ignore # we're guaranteed not to return non-SSAVariables here @property def vars_written(self) -> List[SSAVariable]: @@ -1946,7 +1946,7 @@ class MediumLevelILSet_var_aliased_field(MediumLevelILInstruction, SetVar, SSA): @property def vars_read(self) -> List[SSAVariable]: - return [self.prev, *self.src.vars_read] # type: ignore we're guaranteed not to return non-SSAVariables here + return [self.prev, *self.src.vars_read] # type: ignore # we're guaranteed not to return non-SSAVariables here @property def operands(self) -> List[MediumLevelILOperandType]: diff --git a/python/py.typed b/python/py.typed new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/python/py.typed diff --git a/python/types.py b/python/types.py index e1c7474c..5eba9b8d 100644 --- a/python/types.py +++ b/python/types.py @@ -685,7 +685,7 @@ class TypeBuilder: return BoolWithConfidence(result.value, confidence = result.confidence) @const.setter - def const(self, value:BoolWithConfidenceType) -> None: # type: ignore We explicitly allow 'set' type to be different than 'get' type + def const(self, value:BoolWithConfidenceType) -> None: # type: ignore # We explicitly allow 'set' type to be different than 'get' type core.BNTypeBuilderSetConst(self._handle, BoolWithConfidence.get_core_struct(value)) @property @@ -695,7 +695,7 @@ class TypeBuilder: return BoolWithConfidence(result.value, confidence = result.confidence) @volatile.setter - def volatile(self, value:BoolWithConfidenceType) -> None: # type: ignore We explicitly allow 'set' type to be different than 'get' type + def volatile(self, value:BoolWithConfidenceType) -> None: # type: ignore # We explicitly allow 'set' type to be different than 'get' type core.BNTypeBuilderSetVolatile(self._handle, BoolWithConfidence.get_core_struct(value)) @property |
