[Git][reproducible-builds/diffoscope][master] 3 commits: Drop unused imports.
Chris Lamb (@lamby)
gitlab at salsa.debian.org
Fri Nov 19 00:18:30 UTC 2021
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
28d0e77d by Chris Lamb at 2021-11-18T16:13:57-08:00
Drop unused imports.
- - - - -
491be46e by Chris Lamb at 2021-11-18T16:17:35-08:00
Use isinstance(...) over type(...) ==
- - - - -
f13c6859 by Chris Lamb at 2021-11-18T16:17:35-08:00
Avoid aliasing variables if we aren't going to use them.
- - - - -
6 changed files:
- diffoscope/comparators/decompile.py
- diffoscope/comparators/directory.py
- diffoscope/comparators/elf.py
- diffoscope/comparators/fit.py
- diffoscope/comparators/python.py
- diffoscope/main.py
Changes:
=====================================
diffoscope/comparators/decompile.py
=====================================
@@ -18,7 +18,6 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import re
-import sys
import abc
import logging
@@ -26,7 +25,6 @@ from .utils.file import File
from .utils.operation import Operation
from .utils.container import Container
-from diffoscope.config import Config
from diffoscope.difference import Difference
from diffoscope.excludes import operation_excluded
from diffoscope.tools import (
=====================================
diffoscope/comparators/directory.py
=====================================
@@ -160,7 +160,7 @@ def compare_meta(path1, path2):
try:
stat1 = os.lstat(path1)
stat2 = os.lstat(path2)
- except Exception as e:
+ except Exception:
return []
differences = []
=====================================
diffoscope/comparators/elf.py
=====================================
@@ -35,7 +35,6 @@ from .deb import DebFile, get_build_id_map
from .decompile import DecompilableContainer
from .utils.file import File
from .utils.command import Command, our_check_output
-from .utils.container import Container
DEBUG_SECTION_GROUPS = (
"rawline",
=====================================
diffoscope/comparators/fit.py
=====================================
@@ -81,7 +81,7 @@ class FitContainer(Archive):
dest_path,
)
- output = command.our_check_output(cmd)
+ command.our_check_output(cmd)
# Cannot rely on dumpimage returning a non-zero exit code on failure.
if not os.path.exists(dest_path):
=====================================
diffoscope/comparators/python.py
=====================================
@@ -91,7 +91,7 @@ def show_code(code, indent=""):
yield f"{indent}consts"
for const in code.co_consts:
- if type(const) == types.CodeType:
+ if isinstance(const, types.CodeType):
yield from show_code(const, f"{indent} ")
else:
yield f" {indent}{const!r}"
=====================================
diffoscope/main.py
=====================================
@@ -32,12 +32,10 @@ from . import VERSION
from .path import set_path
from .tools import (
get_tools,
- tool_check_installed,
tool_prepend_prefix,
python_module_missing,
tool_required,
OS_NAMES,
- get_current_os,
)
from .config import Config
from .environ import normalize_environment
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/2f2559b69f172eed1d7eebf47313c01809e9bd69...f13c6859800a7964f02d7ec7e8f1f57519f90924
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/compare/2f2559b69f172eed1d7eebf47313c01809e9bd69...f13c6859800a7964f02d7ec7e8f1f57519f90924
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20211119/16575c23/attachment.htm>
More information about the rb-commits
mailing list