work around flake8 F811 for T.overload redefined functions

Since typing != T as far as flake8 is aware, give the linter an extra
hint.
pull/9348/head
Eli Schwartz 4 years ago
parent 520996fff1
commit f2eb1534dd
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 4
      mesonbuild/dependencies/cuda.py
  2. 4
      mesonbuild/interpreter/interpreter.py

@ -259,9 +259,9 @@ class CudaDependency(SystemDependency):
def _report_dependency_error(self, msg: str) -> None: ...
@T.overload
def _report_dependency_error(self, msg: str, ret_val: TV_ResultTuple) -> TV_ResultTuple: ...
def _report_dependency_error(self, msg: str, ret_val: TV_ResultTuple) -> TV_ResultTuple: ... # noqa: F811
def _report_dependency_error(self, msg: str, ret_val: T.Optional[TV_ResultTuple] = None) -> T.Optional[TV_ResultTuple]:
def _report_dependency_error(self, msg: str, ret_val: T.Optional[TV_ResultTuple] = None) -> T.Optional[TV_ResultTuple]: # noqa: F811
if self.required:
raise DependencyException(msg)

@ -2517,9 +2517,9 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey
def source_strings_to_files(self, sources: T.List['mesonlib.FileOrString']) -> T.List['mesonlib.File']: ...
@T.overload
def source_strings_to_files(self, sources: T.List['SourceInputs']) -> T.List['SourceOutputs']: ...
def source_strings_to_files(self, sources: T.List['SourceInputs']) -> T.List['SourceOutputs']: ... # noqa: F811
def source_strings_to_files(self, sources: T.List['SourceInputs']) -> T.List['SourceOutputs']:
def source_strings_to_files(self, sources: T.List['SourceInputs']) -> T.List['SourceOutputs']: # noqa: F811
"""Lower inputs to a list of Targets and Files, replacing any strings.
:param sources: A raw (Meson DSL) list of inputs (targets, files, and

Loading…
Cancel
Save