diff --git a/.builds/debian.yml b/.builds/debian.yml index d59afb2..e6a1cd9 100644 --- a/.builds/debian.yml +++ b/.builds/debian.yml @@ -31,7 +31,7 @@ tasks: # stop the build if there are Python syntax errors or undefined names poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. - poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + poetry run flake8 . --count --max-complexity=10 --max-line-length=127 --statistics - test: | export PATH="$PATH:/home/build/.local/bin" cd ${project} diff --git a/.github/workflows/pythonapp.yaml b/.github/workflows/pythonapp.yaml index 381ad75..196f3f8 100644 --- a/.github/workflows/pythonapp.yaml +++ b/.github/workflows/pythonapp.yaml @@ -29,7 +29,7 @@ jobs: # stop the build if there are Python syntax errors or undefined names poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - poetry run flake8 . --count --exit-zero --max-complexity=15 --max-line-length=127 --statistics + poetry run flake8 . --count --max-complexity=15 --max-line-length=127 --statistics - name: Test with pytest run: | diff --git a/bin/lsb.py b/bin/lsb.py index 1b09d2b..122bc26 100755 --- a/bin/lsb.py +++ b/bin/lsb.py @@ -56,7 +56,8 @@ class ValidateGenerator(argparse.Action): def main(): parser = argparse.ArgumentParser(prog="stegano-lsb") subparsers = parser.add_subparsers( - help="sub-command help", dest="command", required=True) + help="sub-command help", dest="command", required=True + ) # Subparser: Hide parser_hide = subparsers.add_parser("hide", help="hide help") @@ -155,9 +156,7 @@ def main(): ) # Subparser: List generators - parser_list_generators = subparsers.add_parser( - "list-generators", help="list-generators help" - ) + subparsers.add_parser("list-generators", help="list-generators help") arguments = parser.parse_args() diff --git a/stegano/exifHeader/__init__.py b/stegano/exifHeader/__init__.py index a64a46c..f6e672d 100644 --- a/stegano/exifHeader/__init__.py +++ b/stegano/exifHeader/__init__.py @@ -1,4 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from .exifHeader import * +from .exifHeader import hide, reveal + +__all__ = ["hide", "reveal"] diff --git a/stegano/lsb/__init__.py b/stegano/lsb/__init__.py index 1ffc44a..72435f5 100644 --- a/stegano/lsb/__init__.py +++ b/stegano/lsb/__init__.py @@ -1,4 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from .lsb import * +from .lsb import hide, reveal + +__all__ = ["hide", "reveal"] diff --git a/stegano/red/__init__.py b/stegano/red/__init__.py index d3c8604..83a8a84 100644 --- a/stegano/red/__init__.py +++ b/stegano/red/__init__.py @@ -1,4 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from .red import * +from .red import hide, reveal + +__all__ = ["hide", "reveal"] diff --git a/stegano/steganalysis/__init__.py b/stegano/steganalysis/__init__.py index 239d66c..faa18be 100644 --- a/stegano/steganalysis/__init__.py +++ b/stegano/steganalysis/__init__.py @@ -1,5 +1,2 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- - -from .parity import * -from .statistics import * diff --git a/stegano/tools.py b/stegano/tools.py index 549c64d..f494dbc 100755 --- a/stegano/tools.py +++ b/stegano/tools.py @@ -209,7 +209,9 @@ class Revealer: raise IndexError("Impossible to detect message.") if len(self._bitab) - len(str(self._limit)) - 1 == self._limit: - self.secret_message = "".join(self._bitab)[len(str(self._limit)) + 1 :] + self.secret_message = "".join(self._bitab)[ + len(str(self._limit)) + 1 : # noqa: E203 + ] self.encoded_image.close() return True