Skip to content

Commit

Permalink
pylint: enable consider-merging-isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker authored and eli-schwartz committed Oct 4, 2022
1 parent a72840c commit df1b95c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ disable=
attribute-defined-outside-init,
broad-except,
cell-var-from-loop,
consider-merging-isinstance,
consider-using-f-string,
consider-using-with,
cyclic-import,
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/backend/vs2010backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ def gen_vcxproj(self, target, ofname, guid):
ofile.text = f'$(OutDir){target.get_filename()}'
subsys = ET.SubElement(link, 'SubSystem')
subsys.text = subsystem
if (isinstance(target, build.SharedLibrary) or isinstance(target, build.Executable)) and target.get_import_filename():
if isinstance(target, (build.SharedLibrary, build.Executable)) and target.get_import_filename():
# DLLs built with MSVC always have an import library except when
# they're data-only DLLs, but we don't support those yet.
ET.SubElement(link, 'ImportLibrary').text = target.get_import_filename()
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def process_compilers_late(self, extra_languages: T.List[str]):
# the languages of those libraries as well.
if self.link_targets or self.link_whole_targets:
for t in itertools.chain(self.link_targets, self.link_whole_targets):
if isinstance(t, CustomTarget) or isinstance(t, CustomTargetIndex):
if isinstance(t, (CustomTarget, CustomTargetIndex)):
continue # We can't know anything about these.
for name, compiler in t.compilers.items():
if name in link_langs and name not in self.compilers:
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/modules/hotdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def process_dependencies(self, deps):
self.add_include_path(os.path.join(self.builddir, dep.hotdoc_conf.subdir))
self.cmd += ['--extra-assets=' + p for p in dep.extra_assets]
self.add_extension_paths(dep.extra_extension_paths)
elif isinstance(dep, build.CustomTarget) or isinstance(dep, build.BuildTarget):
elif isinstance(dep, (build.CustomTarget, build.BuildTarget)):
self._dependencies.append(dep)
elif isinstance(dep, build.CustomTargetIndex):
self._dependencies.append(dep.target)
Expand Down

0 comments on commit df1b95c

Please sign in to comment.