Skip to content

Commit

Permalink
chore: Run fix ruff errors
Browse files Browse the repository at this point in the history
An oversight in rebasing #1028
  • Loading branch information
maringuu authored and jstucke committed Mar 7, 2024
1 parent 1085351 commit aaa3c4c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
10 changes: 8 additions & 2 deletions src/fact_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from pathlib import Path
from shlex import split
from subprocess import CalledProcessError, PIPE, run, STDOUT
from subprocess import PIPE, STDOUT, CalledProcessError, run
from time import sleep

import config
Expand Down Expand Up @@ -54,7 +54,13 @@ def __init__(self):
@staticmethod
def _get_git_revision() -> str:
try:
proc = run(split('git rev-parse --short HEAD'), stdout=PIPE, stderr=STDOUT, cwd=Path(__file__).parent)
proc = run(
split('git rev-parse --short HEAD'),
stdout=PIPE,
stderr=STDOUT,
cwd=Path(__file__).parent,
check=False,
)
return proc.stdout.decode().strip()
except CalledProcessError:
return 'unknown revision'
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/analysis/device_tree/code/device_tree.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Dict, Optional

from analysis.plugin import AnalysisPluginV0, Tag
from analysis.plugin.compat import AnalysisBasePluginAdapterMixin
from helperFunctions.tag import TagColor
from plugins.mime_blacklists import MIME_BLACKLIST_COMPRESSED
from analysis.plugin.compat import AnalysisBasePluginAdapterMixin
from analysis.plugin import AnalysisPluginV0, Tag
from typing import Optional, Dict, TYPE_CHECKING

from ..internal.schema import Schema
from ..internal.schema import DeviceTree, IllegalDeviceTreeError
from ..internal.schema import DeviceTree, IllegalDeviceTreeError, Schema

if TYPE_CHECKING:
import io
Expand Down
9 changes: 6 additions & 3 deletions src/plugins/analysis/device_tree/internal/schema.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from __future__ import annotations

import pathlib as pl
from tempfile import NamedTemporaryFile
from typing import ClassVar, List, Optional

import pydantic
from pydantic import Field
from typing import Optional, List, ClassVar
from tempfile import NamedTemporaryFile
import pathlib as pl

from .device_tree_utils import StructureBlock, convert_device_tree_to_str, get_model_or_description, int_from_buf

Expand Down
1 change: 0 additions & 1 deletion src/plugins/analysis/device_tree/test/test_device_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest


from ..code.device_tree import AnalysisPlugin

TEST_DATA = Path(__file__).parent.parent / 'test/data'
Expand Down

0 comments on commit aaa3c4c

Please sign in to comment.