diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-14 12:01:34 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-09-18 14:49:58 -0700 |
commit | cb0265a6b28e74e0a20fe247cad7e82c68f9412b (patch) | |
tree | 72ee86e72e64fdf45270c7d28af42034ea880660 /mesonbuild/build.py | |
parent | 35a5a69355552be744dc7e1e21fee7182bafa99c (diff) | |
download | meson-cb0265a6b28e74e0a20fe247cad7e82c68f9412b.zip meson-cb0265a6b28e74e0a20fe247cad7e82c68f9412b.tar.gz meson-cb0265a6b28e74e0a20fe247cad7e82c68f9412b.tar.bz2 |
pylint: Catch cases of `if len(container)` which should be replaced by `if container`
Unfortunately this doesn't catch other abuses of len(continauer) like,
`len(container) <comparator> 0`, see: https://github.com/PyCQA/pylint/issues/3751
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index f56e484..30fa77a 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2232,7 +2232,7 @@ class CustomTarget(Target): def get_dep_outname(self, infilenames): if self.depfile is None: raise InvalidArguments('Tried to get depfile name for custom_target that does not have depfile defined.') - if len(infilenames): + if infilenames: plainname = os.path.basename(infilenames[0]) basename = os.path.splitext(plainname)[0] return self.depfile.replace('@BASENAME@', basename).replace('@PLAINNAME@', plainname) |