Skip to content

Commit 751798e

Browse files
authored
Merge pull request #12 from jurgenwigg/fix-formatting-again
Fix formatting again
2 parents 3e4a20a + 6b1aa61 commit 751798e

39 files changed

Lines changed: 442 additions & 400 deletions

.github/workflows/python-static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
python -m pip install --upgrade pip tox
2626
- name: Test with tox
2727
run: |
28-
tox -e ${{ matrix.check }} || true
28+
tox -e ${{ matrix.check }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ python = ["3.14", "3.13", "3.12", "3.11"]
5959

6060
[tool.black]
6161
target-version = ["py311", "py312", "py313"]
62-
extend-exclude ='(python2_file_willnotwork|dunderexec_with_parsing_error).py'
62+
extend-exclude ='(python2_file_willnotwork|dunderexec_with_parsing_error).py|validationfiles|suppression|spytestdir'

src/codeaudit/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: 2025-present Maikel Mardjan
1+
# SPDX-FileCopyrightText: 2025-present Maikel Mardjan
22
#
33
# SPDX-License-Identifier: GPL-3.0-or-later
44
__version__ = "1.6.2"

src/codeaudit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2025-present Maikel Mardjan - https://nocomplexity.com/
22
#
33
# SPDX-License-Identifier: GPL-3.0-or-later
4-
from . __about__ import __version__
4+
from .__about__ import __version__

src/codeaudit/altairplots.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
Altair Plotting functions for Python Code Audit (aka codeaudit)
1313
"""
1414

15-
import altair as alt
16-
import pandas as pd
17-
1815
from collections import Counter
1916
from pathlib import Path
2017

18+
import altair as alt
19+
import pandas as pd
20+
2121

2222
def module_count_barchart(scanresult):
2323
"""Create a bar chart showing module counts by category.

src/codeaudit/api_helpers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
Function to create nice APIs. So API helper functions.
1313
"""
1414

15-
import pandas as pd
1615
import html
1716

18-
from codeaudit.security_checks import ast_security_checks
17+
import pandas as pd
18+
19+
from codeaudit.api_interfaces import get_modules, get_overview
20+
from codeaudit.checkmodules import get_all_modules
1921
from codeaudit.filehelpfunctions import (
20-
get_filename_from_path,
2122
collect_python_source_files,
23+
get_filename_from_path,
2224
)
23-
from codeaudit.security_checks import perform_validations
25+
from codeaudit.security_checks import ast_security_checks, perform_validations
2426
from codeaudit.suppression import filter_sast_results
25-
from codeaudit.checkmodules import get_all_modules
26-
from codeaudit.api_interfaces import get_modules, get_overview
2727
from codeaudit.totals import overview_per_file
2828

2929

src/codeaudit/api_interfaces.py

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,37 @@
1313
Public API functions for Python Code Audit aka codeaudit on pypi.org
1414
"""
1515

16+
import datetime
17+
import json
18+
import platform
19+
from collections import Counter
20+
from pathlib import Path
21+
22+
import altair as alt
23+
import pandas as pd
24+
1625
from codeaudit import __version__
26+
from codeaudit.checkmodules import (
27+
check_module_vulnerability,
28+
get_all_modules,
29+
get_imported_modules_by_file,
30+
get_standard_library_modules,
31+
)
1732
from codeaudit.filehelpfunctions import (
18-
get_filename_from_path,
1933
collect_python_source_files,
34+
get_filename_from_path,
2035
is_ast_parsable,
2136
)
22-
from codeaudit.security_checks import perform_validations, ast_security_checks
37+
from codeaudit.privacy_lint import data_egress_scan
38+
from codeaudit.pypi_package_scan import get_package_source, get_pypi_download_info
39+
from codeaudit.security_checks import ast_security_checks, perform_validations
40+
from codeaudit.suppression import filter_sast_results
2341
from codeaudit.totals import (
24-
overview_per_file,
2542
get_statistics,
2643
overview_count,
44+
overview_per_file,
2745
total_modules,
2846
)
29-
from codeaudit.checkmodules import (
30-
get_all_modules,
31-
get_imported_modules_by_file,
32-
get_standard_library_modules,
33-
check_module_vulnerability,
34-
)
35-
from codeaudit.pypi_package_scan import get_pypi_download_info, get_package_source
36-
from codeaudit.suppression import filter_sast_results
37-
from codeaudit.privacy_lint import data_egress_scan
38-
39-
from pathlib import Path
40-
import json
41-
import datetime
42-
import pandas as pd
43-
import platform
44-
from collections import Counter
45-
46-
47-
import altair as alt
4847

4948

5049
def version():

src/codeaudit/api_reporting.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
2020
"""
2121

22-
import pandas as pd
2322
from collections import Counter
2423

24+
import pandas as pd
25+
2526

2627
def total_weaknesses(input_file):
2728
"""Returns the total weaknesses found"""

src/codeaudit/checkmodules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"""
1515

1616
import ast
17-
import sys
1817
import json
18+
import sys
1919
import urllib.request
2020

2121
from codeaudit.filehelpfunctions import collect_python_source_files, read_in_source_file

src/codeaudit/codeaudit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@
1313
CLI functions for codeaudit
1414
"""
1515

16-
import fire # for working CLI with this PoC-thing (The Google way)
1716
import sys
17+
18+
import fire # for working CLI with this PoC-thing (The Google way)
19+
1820
from codeaudit import __version__
1921
from codeaudit.reporting import (
2022
overview_report,
23+
report_implemented_tests,
2124
report_module_information,
2225
scan_report,
23-
report_implemented_tests,
2426
)
2527

2628
codeaudit_ascii_art = r"""

0 commit comments

Comments
 (0)