diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml index 31d5a4b..5a30bdb 100644 --- a/.github/workflows/black.yaml +++ b/.github/workflows/black.yaml @@ -12,4 +12,4 @@ jobs: steps: - uses: actions/checkout@v4 - run: python3 -m pip install --user black==24.4.2 - - run: python3 -m black . + - run: python3 -m black . --check diff --git a/mwccgap/compiler.py b/mwccgap/compiler.py index 1415b4a..03ccfd7 100644 --- a/mwccgap/compiler.py +++ b/mwccgap/compiler.py @@ -1,4 +1,3 @@ -import os import subprocess import sys import tempfile @@ -48,7 +47,6 @@ def _compile_file( stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, - env=dict(os.environ, MWCIncludes="."), # TODO: remove this? ) as proc: return proc.communicate() diff --git a/mwccgap/constants.py b/mwccgap/constants.py index f03547d..124eb9e 100644 --- a/mwccgap/constants.py +++ b/mwccgap/constants.py @@ -14,6 +14,4 @@ LOCAL_SUFFIX = ", local" -IGNORED_RELOCATIONS = ( - ".rel.pdr", -) +IGNORED_RELOCATIONS = (".rel.pdr",) diff --git a/mwccgap/mwccgap.py b/mwccgap/mwccgap.py index 0152001..ff607fd 100755 --- a/mwccgap/mwccgap.py +++ b/mwccgap/mwccgap.py @@ -180,8 +180,9 @@ def process_c_file( rel_rodata_sh_name = compiled_elf.add_sh_symbol(".rel.rodata") relocation_records = [ - record for record in assembled_elf.get_relocations() - if record.name not in IGNORED_RELOCATIONS + record + for record in assembled_elf.get_relocations() + if record.name not in IGNORED_RELOCATIONS ] assert ( len(relocation_records) < 3