Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions phi_complexity/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,7 @@ def _executer_memory() -> int:

def _executer_fund() -> None:
"""Affiche le message de soutien à la recherche souveraine."""
print(
"""
print("""
╔══════════════════════════════════════════════════╗
║ PHI-COMPLEXITY — RECHERCHE SOUVERAINE ║
╚══════════════════════════════════════════════════╝
Expand All @@ -756,8 +755,7 @@ def _executer_fund() -> None:
◈ WEB : https://phidelia.dev

Merci de participer à la SUTURE universelle. ✦
"""
)
""")


def _executer_vault(args: argparse.Namespace, fichiers: List[str]) -> int:
Expand Down
12 changes: 4 additions & 8 deletions tests/test_metriques.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,13 @@ def test_entropie_fibonacci_present_dans_resultat(self):
from phi_complexity.analyseur import AnalyseurPhi
from phi_complexity.metriques import CalculateurRadiance

code = textwrap.dedent(
"""
code = textwrap.dedent("""
def f(x):
return x * 2

def g(a, b):
return a + b
"""
)
""")
with tempfile.NamedTemporaryFile(
mode="w", suffix=".py", delete=False, encoding="utf-8"
) as temp_file:
Expand Down Expand Up @@ -339,12 +337,10 @@ def test_coherence_bayes_dans_resultat_calculer(self, tmp_path):
from phi_complexity.analyseur import AnalyseurPhi
from phi_complexity.metriques import CalculateurRadiance

code = textwrap.dedent(
"""\
code = textwrap.dedent("""\
def f(): pass
def g(): pass
"""
)
""")
f = tmp_path / "test.py"
f.write_text(code)
r = AnalyseurPhi(str(f)).analyser()
Expand Down
6 changes: 2 additions & 4 deletions tests/test_securite.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,7 @@ def test_phi_quality_annotations_excluded_from_security_gate(self):
try:
file_path = os.path.join(tmpdir, "complexe.py")
with open(file_path, "w", encoding="utf-8") as f:
f.write(
"""def f(a, b, c):
f.write("""def f(a, b, c):
if a:
if b:
if c:
Expand All @@ -573,8 +572,7 @@ def test_phi_quality_annotations_excluded_from_security_gate(self):
if (a and b) or (b and c) or (a and c):
return 5
return 0
"""
)
""")

audit = construire_audit_securite([file_path])
summary = audit["summary"]
Expand Down
Loading