From 194c6b6907ef21cb30634f71509a70bf06cbb9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Thu, 25 Apr 2024 13:59:47 +0200 Subject: [PATCH] usbsdmux: apply ruff "B", "E", "F" rules automatically or add ignores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The setup.py and fastentrypoints.py fixes are somewhat superfluous, because they will go away with the switch to pyproject.toml, but fix them anyways. Signed-off-by: Leonard Göhrs --- fastentrypoints.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fastentrypoints.py b/fastentrypoints.py index d088da2..3e9cb8e 100644 --- a/fastentrypoints.py +++ b/fastentrypoints.py @@ -60,7 +60,7 @@ def get_args(cls, dist, header=None): """ if header is None: header = cls.get_header() - spec = str(dist.as_requirement()) + spec = str(dist.as_requirement()) # noqa: F841 for type_ in "console", "gui": group = type_ + "_scripts" for name, ep in dist.get_entry_map(group).items(): @@ -94,14 +94,14 @@ def main(): with open(manifest_path, "a+") as manifest: manifest.seek(0) manifest_content = manifest.read() - if not "include fastentrypoints.py" in manifest_content: + if "include fastentrypoints.py" not in manifest_content: manifest.write(("\n" if manifest_content else "") + "include fastentrypoints.py") # Insert the import statement to setup.py if not present with open(setup_path, "a+") as setup: setup.seek(0) setup_content = setup.read() - if not "import fastentrypoints" in setup_content: + if "import fastentrypoints" not in setup_content: setup.seek(0) setup.truncate() setup.write("import fastentrypoints\n" + setup_content) diff --git a/setup.py b/setup.py index 472072f..2026187 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup -import fastentrypoints +import fastentrypoints # noqa: F401 setup( name="usbsdmux",