Skip to content

Commit

Permalink
Fix isort CI check (#1146)
Browse files Browse the repository at this point in the history
Fixes: #1145
  • Loading branch information
Molkree authored Apr 28, 2021
1 parent 4e0e212 commit 6d88866
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 16 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,22 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: jamescurtin/isort-action@master
- name: Get cached Python packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel setuptools
python -m pip install -r requirements.txt -r doc/requirements.txt
- uses: isort/isort-action@master
with:
configuration: ".isort.cfg"
configuration: --profile black --check-only
requirementsFiles: "requirements.txt doc/requirements.txt"

check:
name: Black check
Expand Down
5 changes: 2 additions & 3 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[tool.isort]
profile = "black"
multi_line_output = 3
[settings]
profile=black
6 changes: 3 additions & 3 deletions cve_bin_tool/output_engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
from typing import IO, Dict

from ..cve_scanner import CVEData
from ..cvedb import CVEDB
from ..error_handler import ErrorHandler, ErrorMode
from ..log import LOGGER
from ..util import ProductInfo
from ..version import VERSION
from . import pdfbuilder
from .console import output_console
from .html import output_html
from .util import add_extension_if_not, format_output, generate_filename
from . import pdfbuilder
from ..cvedb import CVEDB
from ..version import VERSION


def output_json(all_cve_data: Dict[ProductInfo, CVEData], outfile: IO):
Expand Down
14 changes: 7 additions & 7 deletions cve_bin_tool/output_engine/pdfbuilder.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from datetime import datetime

from reportlab.graphics.shapes import Drawing, Rect, String
from reportlab.lib import colors
from reportlab.lib.styles import ParagraphStyle as PS
from reportlab.platypus import PageBreak, Spacer, TableStyle, Image
from reportlab.platypus.paragraph import Paragraph
from reportlab.lib.units import cm
from reportlab.platypus import Image, PageBreak, Spacer, TableStyle
from reportlab.platypus.doctemplate import (
PageTemplate,
BaseDocTemplate,
PageTemplate,
SimpleDocTemplate,
)
from reportlab.platypus.frames import Frame
from reportlab.platypus.paragraph import Paragraph
from reportlab.platypus.tableofcontents import TableOfContents
from reportlab.platypus.tables import Table
from reportlab.platypus.frames import Frame
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.graphics.shapes import Drawing, Rect, String


class PDFDocTemplate(SimpleDocTemplate):
Expand Down
4 changes: 3 additions & 1 deletion test/test_condensed_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
Condensed Downloads Test
"""
import importlib
import pytest
import subprocess
from test.test_data import __all__ as all_test_name

import pytest


# Test to check condensed files are commited according to the package test data of checkers
def test_condensed_downloads():
test_data = list(
Expand Down

0 comments on commit 6d88866

Please sign in to comment.