diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb403bd..d29636c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,19 @@ repos: - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.2.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: ['--profile', 'black'] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.8.0 hooks: - id: mypy additional_dependencies: [pytest >= 7.0.0] diff --git a/diopter/compiler.py b/diopter/compiler.py index 56cc279..8225821 100644 --- a/diopter/compiler.py +++ b/diopter/compiler.py @@ -47,6 +47,7 @@ # The output should be 2 assert output.stdout.strip() == "2" """ + from __future__ import annotations import argparse @@ -1185,9 +1186,11 @@ def get_compilation_cmd( str(self.compiler.exe), f"-{self.opt_level.name}", ), - (program[0].language.get_language_flag(),) - if include_language_flags - else ("",), + ( + (program[0].language.get_language_flag(),) + if include_language_flags + else ("",) + ), self.flags, (f"-I{path}" for path in self.include_paths), (f"-isystem{path}" for path in self.system_include_paths), diff --git a/diopter/generator.py b/diopter/generator.py index 842acb7..1bdb0e9 100644 --- a/diopter/generator.py +++ b/diopter/generator.py @@ -89,7 +89,6 @@ class CSmithGenerator(Generator): default_options_pool = [ "arrays", "bitfields", - "checksum", "comma-operators", "compound-assignment", "consts", diff --git a/diopter/reducer.py b/diopter/reducer.py index eefd86e..442385b 100644 --- a/diopter/reducer.py +++ b/diopter/reducer.py @@ -20,6 +20,7 @@ def test(self, program: SourceProgram) -> bool: if rprogram: #the reduction was successful """ + import inspect import logging import os diff --git a/diopter/sanitizer.py b/diopter/sanitizer.py index 8686f15..3ff8c9a 100644 --- a/diopter/sanitizer.py +++ b/diopter/sanitizer.py @@ -11,6 +11,7 @@ if not sanitizer.sanitize(program): # the program is broken """ + from __future__ import annotations import subprocess diff --git a/setup.cfg b/setup.cfg index cd2a31c..9e6e9ca 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = diopter -version = 0.0.26 +version = 0.0.27 author = Theodoros Theodoridis, Yann Girsberger author_email = theodort@inf.ethz.ch description = A library for building differential tests