Skip to content

Commit

Permalink
Update pre-commit hooks' versions and reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
thetheodor committed Feb 15, 2024
1 parent d3766b2 commit 22b2530
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
9 changes: 6 additions & 3 deletions diopter/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
# The output should be 2
assert output.stdout.strip() == "2"
"""

from __future__ import annotations

import argparse
Expand Down Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions diopter/reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def test(self, program: SourceProgram) -> bool:
if rprogram:
#the reduction was successful
"""

import inspect
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions diopter/sanitizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
if not sanitizer.sanitize(program):
# the program is broken
"""

from __future__ import annotations

import subprocess
Expand Down

0 comments on commit 22b2530

Please sign in to comment.