diff --git a/.github/ruff.toml b/.github/ruff.toml index 7d208862..ddf7fe94 100644 --- a/.github/ruff.toml +++ b/.github/ruff.toml @@ -1,5 +1,6 @@ select = ["E"] -ignore = [] +ignore = ["E402", "E722", "E902"] +exclude = ["*_pb2.py", "*_pb2.pyi", "capa2yara.py"] # Same as pycodestyle. -line-length = 180 \ No newline at end of file +line-length = 180 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5fdb32f..6d270aaa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: - name: Install dependencies run: pip install -e .[dev] - name: Lint with ruff - run: ruff --config .github/ruff.toml --exclude "*_pb2.pyi" check . + run: ruff --config .github/ruff.toml check . - name: Lint with isort run: isort --profile black --length-sort --line-width 120 --skip-glob "*_pb2.py" -c . - name: Lint with black diff --git a/capa/ida/plugin/form.py b/capa/ida/plugin/form.py index 6084277d..70a5f128 100644 --- a/capa/ida/plugin/form.py +++ b/capa/ida/plugin/form.py @@ -607,7 +607,8 @@ class CapaExplorerForm(idaapi.PluginForm): except UserCancelledError as e: capa.ida.helpers.inform_user_ida_ui("Analysis requires capa rules") logger.warning( - f"You must specify a directory containing capa rules before running analysis. Download and extract the official rules from {CAPA_OFFICIAL_RULESET_URL} (recommended)." + f"You must specify a directory containing capa rules before running analysis. " + f"Download and extract the official rules from {CAPA_OFFICIAL_RULESET_URL} (recommended)." ) return False except Exception as e: @@ -705,7 +706,8 @@ class CapaExplorerForm(idaapi.PluginForm): capa.ida.helpers.inform_user_ida_ui("Cached results were generated using different capas rules") logger.warning( - "capa is showing you cached results from a previous analysis run. Your rules have changed since and you should reanalyze the program to see new results." + "capa is showing you cached results from a previous analysis run. " + "Your rules have changed since and you should reanalyze the program to see new results." ) view_status_rules = "no rules matched for cache"