pylint: fix false positive for variable defined in different copies of conditional
We do: ``` if is_thing: assignme = value if_is_thing: ... else: assignme = [] ``` It is always defined on both sides, but there was no particular reason we had to assign it in the later copy. pylint reported it as a false positive, and it may prove confusing in general, and it's harmless to move, so do so.
This commit is contained in:
parent
e343590e7d
commit
125d3344ec
|
@ -440,6 +440,8 @@ class GnomeModule(ExtensionModule):
|
|||
|
||||
depend_files, depends, subdirs = self._get_gresource_dependencies(
|
||||
state, ifile, source_dirs, dependencies)
|
||||
else:
|
||||
depend_files = []
|
||||
|
||||
# Make source dirs relative to build dir now
|
||||
source_dirs = [os.path.join(state.build_to_src, state.subdir, d) for d in source_dirs]
|
||||
|
@ -492,7 +494,6 @@ class GnomeModule(ExtensionModule):
|
|||
target_cmd = cmd
|
||||
else:
|
||||
depfile = f'{output}.d'
|
||||
depend_files = []
|
||||
target_cmd = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@']
|
||||
target_c = GResourceTarget(
|
||||
name,
|
||||
|
|
Loading…
Reference in New Issue