fix various flake8 whitespace errors

pull/9667/head
Eli Schwartz 3 years ago committed by Nirbheek Chauhan
parent 18abf2cebb
commit 5f5ebc7262
  1. 1
      mesonbuild/interpreter/primitives/array.py
  2. 1
      mesonbuild/interpreter/primitives/integer.py
  3. 1
      mesonbuild/interpreterbase/baseobjects.py
  4. 1
      mesonbuild/wrap/wrap.py

@ -34,7 +34,6 @@ class ArrayHolder(ObjectHolder[T.List[TYPE_var]], IterableObject):
'get': self.get_method, 'get': self.get_method,
}) })
self.trivial_operators.update({ self.trivial_operators.update({
MesonOperator.EQUALS: (list, lambda x: self.held_object == x), MesonOperator.EQUALS: (list, lambda x: self.held_object == x),
MesonOperator.NOT_EQUALS: (list, lambda x: self.held_object != x), MesonOperator.NOT_EQUALS: (list, lambda x: self.held_object != x),

@ -80,4 +80,3 @@ class IntegerHolder(ObjectHolder[int]):
if other == 0: if other == 0:
raise InvalidArguments('Tried to divide by 0') raise InvalidArguments('Tried to divide by 0')
return self.held_object % other return self.held_object % other

@ -42,6 +42,7 @@ TYPE_key_resolver = T.Callable[[mparser.BaseNode], str]
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from typing_extensions import Protocol from typing_extensions import Protocol
__T = T.TypeVar('__T', bound=TYPE_var, contravariant=True) __T = T.TypeVar('__T', bound=TYPE_var, contravariant=True)
class OperatorCall(Protocol[__T]): class OperatorCall(Protocol[__T]):
def __call__(self, other: __T) -> TYPE_var: ... def __call__(self, other: __T) -> TYPE_var: ...

@ -151,7 +151,6 @@ class PackageDefinition:
if f'{what}_filename' in self.values and f'{what}_url' not in self.values: if f'{what}_filename' in self.values and f'{what}_url' not in self.values:
FeatureNew(f'Local wrap patch files without {what}_url', '0.55.0').use(self.subproject) FeatureNew(f'Local wrap patch files without {what}_url', '0.55.0').use(self.subproject)
def parse_wrap_section(self, config: configparser.ConfigParser) -> None: def parse_wrap_section(self, config: configparser.ConfigParser) -> None:
if len(config.sections()) < 1: if len(config.sections()) < 1:
raise WrapException(f'Missing sections in {self.basename}') raise WrapException(f'Missing sections in {self.basename}')

Loading…
Cancel
Save