Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dee5fe8eff |
+3
-2
@@ -40,7 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [0.1.0] - 2026-09-08
|
## [0.1.0] - 2026-09-08
|
||||||
|
|
||||||
Initial release covering milestones M1 through M15, except the optional Gitea Actions workflow.
|
Initial release covering milestones M1 through M15.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- **M1 (Scaffolding)**: Python project structure with `pyproject.toml`, and tooling configuration for `ruff`, `mypy`, `bandit`, and `pre-commit`.
|
- **M1 (Scaffolding)**: Python project structure with `pyproject.toml`, and tooling configuration for `ruff`, `mypy`, `bandit`, and `pre-commit`.
|
||||||
@@ -57,4 +57,5 @@ Initial release covering milestones M1 through M15, except the optional Gitea Ac
|
|||||||
- **M12 (CLI entry point)**: `pronote-sync` command with `--dry-run` and `--log-level` options, redacted error display, and safe traceback in DEBUG mode.
|
- **M12 (CLI entry point)**: `pronote-sync` command with `--dry-run` and `--log-level` options, redacted error display, and safe traceback in DEBUG mode.
|
||||||
- **M13 (Tests & coverage)**: 636 tests with 95.67% coverage, test fixtures (`pronote-4e.ics`, `pronote-6e.ics`), shared `conftest.py`, and secret non-leak tests.
|
- **M13 (Tests & coverage)**: 636 tests with 95.67% coverage, test fixtures (`pronote-4e.ics`, `pronote-6e.ics`), shared `conftest.py`, and secret non-leak tests.
|
||||||
- **M14 (Deployment)**: systemd service and timer (daily at 18:00), logrotate configuration (daily, rotate 7, compress), `check_secrets.py` pre-deployment scanner, and exploitation guide.
|
- **M14 (Deployment)**: systemd service and timer (daily at 18:00), logrotate configuration (daily, rotate 7, compress), `check_secrets.py` pre-deployment scanner, and exploitation guide.
|
||||||
- **M15 (Documentation)**: README, README.LLM.md (AI agent setup guide), MIT LICENSE, CHANGELOG, and local validation procedures. Gitea Actions CI/CD remains optional and is not delivered in this release.
|
- **M15 (Documentation)**: README, README.LLM.md (AI agent setup guide), MIT LICENSE, CHANGELOG, and Gitea Actions CI/CD reference for LXC/VPS (Debian/CentOS).
|
||||||
|
- **Other**: MIT License. Gitea Actions CI/CD reference for LXC/VPS (Debian/CentOS) is planned and optional, not delivered in this release.
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ Synchronise l'agenda et les devoirs de **Pronote** vers un calendrier **CalDAV**
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Cloner le dépôt
|
# Cloner le dépôt
|
||||||
git clone https://git.antoineve.me/AntoineVe/college-infos
|
git clone <repo-url>
|
||||||
cd college-infos
|
cd pronote-sync
|
||||||
|
|
||||||
# Créer l'environnement virtuel
|
# Créer l'environnement virtuel
|
||||||
python3.13 -m venv .venv
|
python3.13 -m venv .venv
|
||||||
@@ -48,23 +48,6 @@ pas garantir un état persistant cohérent pendant une simulation.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Validation et CI
|
|
||||||
|
|
||||||
Aucun workflow Gitea Actions n'est livré actuellement. Les validations du projet sont donc
|
|
||||||
exécutées localement avec les commandes suivantes :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pytest
|
|
||||||
ruff check .
|
|
||||||
mypy .
|
|
||||||
bandit -r pronote_sync/
|
|
||||||
```
|
|
||||||
|
|
||||||
`pre-commit run --all-files` regroupe également les contrôles de formatage, typage, sécurité et
|
|
||||||
détection de secrets.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🛠️ Déploiement
|
## 🛠️ Déploiement
|
||||||
|
|
||||||
Les artefacts pour **systemd/timer** et **logrotate** sont fournis dans `deploy/`. Voir [docs/exploitation.md](docs/exploitation.md) pour plus de détails.
|
Les artefacts pour **systemd/timer** et **logrotate** sont fournis dans `deploy/`. Voir [docs/exploitation.md](docs/exploitation.md) pour plus de détails.
|
||||||
|
|||||||
@@ -308,5 +308,5 @@ Rédiger la documentation utilisateur et finaliser le projet.
|
|||||||
|
|
||||||
### Critères d'acceptation
|
### Critères d'acceptation
|
||||||
- `README.md` permet d'installer et de lancer le projet sans le guide.
|
- `README.md` permet d'installer et de lancer le projet sans le guide.
|
||||||
- Les procédures locales de test, lint et sécurité sont documentées et exécutables.
|
- Gitea Actions exécute tests + lint + sécurité.
|
||||||
- Aucun secret dans la documentation.
|
- Aucun secret dans la documentation.
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ def fetch_step(
|
|||||||
:raises PronoteAuthRotationError: Si une rotation du token d'authentification
|
:raises PronoteAuthRotationError: Si une rotation du token d'authentification
|
||||||
pronotepy est nécessaire : propagée telle quelle jusqu'au pipeline.
|
pronotepy est nécessaire : propagée telle quelle jusqu'au pipeline.
|
||||||
"""
|
"""
|
||||||
|
critical_error: PipelineCriticalError | None = None
|
||||||
try:
|
try:
|
||||||
lessons, school_events = fetcher.fetch_agenda()
|
lessons, school_events = fetcher.fetch_agenda()
|
||||||
target_date = resolve_target_date(today or date.today(), lessons, school_events)
|
target_date = resolve_target_date(today or date.today(), lessons, school_events)
|
||||||
@@ -130,9 +131,11 @@ def fetch_step(
|
|||||||
except PronoteAuthRotationError:
|
except PronoteAuthRotationError:
|
||||||
raise
|
raise
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise PipelineCriticalError(
|
critical_error = PipelineCriticalError(
|
||||||
f"Récupération Pronote impossible : {redact_exception(exc)}", step="fetch"
|
f"Récupération Pronote impossible : {redact_exception(exc)}", step="fetch"
|
||||||
) from None
|
)
|
||||||
|
if critical_error is not None:
|
||||||
|
raise critical_error from None
|
||||||
|
|
||||||
messages, warnings = _fetch_optional_messages(fetcher)
|
messages, warnings = _fetch_optional_messages(fetcher)
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|||||||
from pronote_sync.sources.blog.result import BlogRSSFetchResult
|
from pronote_sync.sources.blog.result import BlogRSSFetchResult
|
||||||
from pronote_sync.sources.blog.rss import BlogRSSClient
|
from pronote_sync.sources.blog.rss import BlogRSSClient
|
||||||
from pronote_sync.sources.blog.state import BlogRSSState
|
from pronote_sync.sources.blog.state import BlogRSSState
|
||||||
from pronote_sync.utils.redaction import redact_exception
|
from pronote_sync.utils.redaction import redact_exception, redact_secrets
|
||||||
|
|
||||||
|
|
||||||
def fetch_blog_step(client: BlogRSSClient | None, state: BlogRSSState | None) -> BlogRSSFetchResult:
|
def fetch_blog_step(client: BlogRSSClient | None, state: BlogRSSState | None) -> BlogRSSFetchResult:
|
||||||
@@ -24,15 +24,18 @@ def fetch_blog_step(client: BlogRSSClient | None, state: BlogRSSState | None) ->
|
|||||||
"""
|
"""
|
||||||
if client is None or state is None:
|
if client is None or state is None:
|
||||||
return BlogRSSFetchResult()
|
return BlogRSSFetchResult()
|
||||||
|
error_message: str | None = None
|
||||||
try:
|
try:
|
||||||
etag, last_modified = state.get_cache_headers()
|
etag, last_modified = state.get_cache_headers()
|
||||||
result = client.fetch_and_parse(
|
result = client.fetch_and_parse(
|
||||||
known_guids=state.get_known_guids(), etag=etag, last_modified=last_modified
|
known_guids=state.get_known_guids(), etag=etag, last_modified=last_modified
|
||||||
)
|
)
|
||||||
if result.error is not None:
|
if result.error is not None:
|
||||||
raise RuntimeError(result.error) from None
|
error_message = f"Récupération du blog échouée : {redact_secrets(result.error)}"
|
||||||
if not result.not_modified and not result.articles:
|
elif not result.not_modified and not result.articles:
|
||||||
state.update_cache_headers(result.etag, result.last_modified)
|
state.update_cache_headers(result.etag, result.last_modified)
|
||||||
return result
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise RuntimeError(f"Récupération du blog échouée : {redact_exception(exc)}") from None
|
error_message = f"Récupération du blog échouée : {redact_exception(exc)}"
|
||||||
|
if error_message is not None:
|
||||||
|
raise RuntimeError(error_message) from None
|
||||||
|
return result
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ class PronoteAuthState:
|
|||||||
}
|
}
|
||||||
tmp_file = self._state_file.with_suffix(".tmp")
|
tmp_file = self._state_file.with_suffix(".tmp")
|
||||||
fd: int | None = None
|
fd: int | None = None
|
||||||
|
write_error: PronoteSyncError | None = None
|
||||||
try:
|
try:
|
||||||
# Nettoie un éventuel fichier temporaire stale laissé par une exécution interrompue.
|
# Nettoie un éventuel fichier temporaire stale laissé par une exécution interrompue.
|
||||||
if tmp_file.exists():
|
if tmp_file.exists():
|
||||||
@@ -259,10 +260,12 @@ class PronoteAuthState:
|
|||||||
"Nettoyage du fichier temporaire d'état d'authentification Pronote échoué : %s",
|
"Nettoyage du fichier temporaire d'état d'authentification Pronote échoué : %s",
|
||||||
redact_exception(cleanup_exc),
|
redact_exception(cleanup_exc),
|
||||||
)
|
)
|
||||||
raise PronoteSyncError(
|
write_error = PronoteSyncError(
|
||||||
f"Impossible d'écrire le fichier d'état d'authentification Pronote "
|
f"Impossible d'écrire le fichier d'état d'authentification Pronote "
|
||||||
f"{redact_secrets(str(self._state_file))}."
|
f"{redact_secrets(str(self._state_file))}."
|
||||||
) from None
|
)
|
||||||
|
if write_error is not None:
|
||||||
|
raise write_error from None
|
||||||
|
|
||||||
def clear(self) -> None:
|
def clear(self) -> None:
|
||||||
"""Supprime le fichier d'état d'authentification.
|
"""Supprime le fichier d'état d'authentification.
|
||||||
|
|||||||
@@ -274,8 +274,9 @@ class PronoteFetcher:
|
|||||||
f"Impossible de récupérer l'agenda : la source {primary} a échoué"
|
f"Impossible de récupérer l'agenda : la source {primary} a échoué"
|
||||||
) from None
|
) from None
|
||||||
logger.info("Repli sur %s pour l'agenda.", fallback)
|
logger.info("Repli sur %s pour l'agenda.", fallback)
|
||||||
|
fallback_result: tuple[list[Lesson], list[SchoolEvent]] | None = None
|
||||||
try:
|
try:
|
||||||
lessons, school_events = self._fetch_agenda_source(fallback)
|
fallback_result = self._fetch_agenda_source(fallback)
|
||||||
except PronoteAuthRotationError:
|
except PronoteAuthRotationError:
|
||||||
raise
|
raise
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
@@ -284,10 +285,11 @@ class PronoteFetcher:
|
|||||||
fallback,
|
fallback,
|
||||||
redact_exception(exc),
|
redact_exception(exc),
|
||||||
)
|
)
|
||||||
|
if fallback_result is None:
|
||||||
raise PipelineCriticalError(
|
raise PipelineCriticalError(
|
||||||
f"Impossible de récupérer l'agenda : les sources {primary}"
|
f"Impossible de récupérer l'agenda : les sources {primary} et {fallback} ont échoué"
|
||||||
f" et {fallback} ont échoué"
|
|
||||||
) from None
|
) from None
|
||||||
|
lessons, school_events = fallback_result
|
||||||
if not lessons:
|
if not lessons:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Le repli %s pour l'agenda a retourné un résultat vide après l'échec "
|
"Le repli %s pour l'agenda a retourné un résultat vide après l'échec "
|
||||||
@@ -401,8 +403,9 @@ class PronoteFetcher:
|
|||||||
f"Impossible de récupérer les devoirs : la source {primary} a échoué"
|
f"Impossible de récupérer les devoirs : la source {primary} a échoué"
|
||||||
) from None
|
) from None
|
||||||
logger.info("Repli sur %s pour les devoirs.", fallback)
|
logger.info("Repli sur %s pour les devoirs.", fallback)
|
||||||
|
fallback_result: list[Homework] | None = None
|
||||||
try:
|
try:
|
||||||
homeworks = self._fetch_homework_source(fallback, target_date)
|
fallback_result = self._fetch_homework_source(fallback, target_date)
|
||||||
except PronoteAuthRotationError:
|
except PronoteAuthRotationError:
|
||||||
raise
|
raise
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
@@ -411,10 +414,12 @@ class PronoteFetcher:
|
|||||||
fallback,
|
fallback,
|
||||||
redact_exception(exc),
|
redact_exception(exc),
|
||||||
)
|
)
|
||||||
|
if fallback_result is None:
|
||||||
raise PipelineCriticalError(
|
raise PipelineCriticalError(
|
||||||
f"Impossible de récupérer les devoirs : les sources {primary}"
|
f"Impossible de récupérer les devoirs : les sources {primary}"
|
||||||
f" et {fallback} ont échoué"
|
f" et {fallback} ont échoué"
|
||||||
) from None
|
) from None
|
||||||
|
homeworks = fallback_result
|
||||||
if not homeworks:
|
if not homeworks:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Le repli %s pour les devoirs a retourné un résultat vide après "
|
"Le repli %s pour les devoirs a retourné un résultat vide après "
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ class JsonTheoreticalAgendaProvider:
|
|||||||
self._file_path: str = file_path
|
self._file_path: str = file_path
|
||||||
self._parity_service: WeekParityService | None = parity_service
|
self._parity_service: WeekParityService | None = parity_service
|
||||||
self._holiday_calendar: SchoolHolidayCalendar | None = holiday_calendar
|
self._holiday_calendar: SchoolHolidayCalendar | None = holiday_calendar
|
||||||
|
load_error: PronoteSyncError | None = None
|
||||||
try:
|
try:
|
||||||
content = Path(file_path).read_text(encoding="utf-8")
|
content = Path(file_path).read_text(encoding="utf-8")
|
||||||
parsed = TheoreticalAgendaFile.model_validate_json(content)
|
parsed = TheoreticalAgendaFile.model_validate_json(content)
|
||||||
@@ -94,9 +95,11 @@ class JsonTheoreticalAgendaProvider:
|
|||||||
redact_secrets(str(file_path)),
|
redact_secrets(str(file_path)),
|
||||||
redact_exception(exc),
|
redact_exception(exc),
|
||||||
)
|
)
|
||||||
raise PronoteSyncError(
|
load_error = PronoteSyncError(
|
||||||
f"Le fichier d'agenda théorique est invalide : {redact_secrets(str(file_path))}"
|
f"Le fichier d'agenda théorique est invalide : {redact_secrets(str(file_path))}"
|
||||||
) from None
|
)
|
||||||
|
if load_error is not None:
|
||||||
|
raise load_error from None
|
||||||
self._lessons: tuple[TheoreticalLessonEntry, ...] = parsed.lessons
|
self._lessons: tuple[TheoreticalLessonEntry, ...] = parsed.lessons
|
||||||
if self._parity_service is None and any(
|
if self._parity_service is None and any(
|
||||||
entry.week in ("even", "odd") for entry in self._lessons
|
entry.week in ("even", "odd") for entry in self._lessons
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ class SchoolHolidayCalendar:
|
|||||||
raise PronoteSyncError(
|
raise PronoteSyncError(
|
||||||
f"Le fichier de vacances scolaires est introuvable : {redact_secrets(str(path))}"
|
f"Le fichier de vacances scolaires est introuvable : {redact_secrets(str(path))}"
|
||||||
) from None
|
) from None
|
||||||
|
load_error: PronoteSyncError | None = None
|
||||||
try:
|
try:
|
||||||
data: Any = json.loads(path.read_text(encoding="utf-8"))
|
data: Any = json.loads(path.read_text(encoding="utf-8"))
|
||||||
file_model: SchoolHolidayFile = SchoolHolidayFile.model_validate(data)
|
file_model: SchoolHolidayFile = SchoolHolidayFile.model_validate(data)
|
||||||
@@ -86,9 +87,11 @@ class SchoolHolidayCalendar:
|
|||||||
redact_secrets(str(path)),
|
redact_secrets(str(path)),
|
||||||
redact_exception(exc),
|
redact_exception(exc),
|
||||||
)
|
)
|
||||||
raise PronoteSyncError(
|
load_error = PronoteSyncError(
|
||||||
f"Le fichier de vacances scolaires est invalide : {redact_secrets(str(path))}"
|
f"Le fichier de vacances scolaires est invalide : {redact_secrets(str(path))}"
|
||||||
) from None
|
)
|
||||||
|
if load_error is not None:
|
||||||
|
raise load_error from None
|
||||||
self._periods = file_model.periods
|
self._periods = file_model.periods
|
||||||
|
|
||||||
def is_holiday(self, target_date: date) -> bool:
|
def is_holiday(self, target_date: date) -> bool:
|
||||||
|
|||||||
+5
-6
@@ -7,10 +7,9 @@ name = "pronote-sync"
|
|||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
description = "Synchronisation Pronote → CalDAV + XMPP"
|
description = "Synchronisation Pronote → CalDAV + XMPP"
|
||||||
license = {text = "MIT"}
|
license = {text = "MIT"}
|
||||||
readme = "README.md"
|
|
||||||
requires-python = ">=3.13.5"
|
requires-python = ">=3.13.5"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Antoine Van Elstraete", email = "antoine@van-elstraete.net"}
|
{name = "Votre Nom", email = "votre@email.com"}
|
||||||
]
|
]
|
||||||
keywords = ["pronote", "caldav", "xmpp", "sync", "school"]
|
keywords = ["pronote", "caldav", "xmpp", "sync", "school"]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
@@ -58,10 +57,10 @@ dev = [
|
|||||||
pronote-sync = "pronote_sync.cli.main:main"
|
pronote-sync = "pronote_sync.cli.main:main"
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://git.antoineve.me/AntoineVe/college-infos"
|
Homepage = "https://github.com/votre-utilisateur/pronote-sync"
|
||||||
Documentation = "https://git.antoineve.me/AntoineVe/college-infos/wiki"
|
Documentation = "https://github.com/votre-utilisateur/pronote-sync#readme"
|
||||||
Repository = "https://git.antoineve.me/AntoineVe/college-infos"
|
Repository = "https://github.com/votre-utilisateur/pronote-sync"
|
||||||
Issues = "https://git.antoineve.me/AntoineVe/college-infos/issues"
|
Issues = "https://github.com/votre-utilisateur/pronote-sync/issues"
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
where = ["."]
|
where = ["."]
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
"""Régressions sur le contexte des exceptions expurgées."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import ast
|
||||||
|
import traceback
|
||||||
|
from datetime import date
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from pronote_sync.errors import PipelineCriticalError
|
||||||
|
from pronote_sync.models.agenda import Lesson, SchoolEvent
|
||||||
|
from pronote_sync.models.homework import Homework
|
||||||
|
from pronote_sync.models.message import Message
|
||||||
|
from pronote_sync.pipeline.steps.fetch import fetch_step
|
||||||
|
|
||||||
|
|
||||||
|
class _FailingFetcher:
|
||||||
|
"""Fetcher minimal qui expose une erreur externe porteuse d'un secret."""
|
||||||
|
|
||||||
|
def fetch_agenda(self) -> tuple[list[Lesson], list[SchoolEvent]]:
|
||||||
|
"""Déclenche une erreur externe pendant la récupération critique."""
|
||||||
|
raise RuntimeError("password=fetch-context-secret")
|
||||||
|
|
||||||
|
def fetch_homework(self, target_date: date) -> list[Homework]:
|
||||||
|
"""Retourne une liste vide pour compléter le protocole du fetcher."""
|
||||||
|
return []
|
||||||
|
|
||||||
|
def fetch_messages(self) -> list[Message]:
|
||||||
|
"""Retourne une liste vide pour compléter le protocole du fetcher."""
|
||||||
|
return []
|
||||||
|
|
||||||
|
def fetch_informations(self) -> list[Message]:
|
||||||
|
"""Retourne une liste vide pour compléter le protocole du fetcher."""
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def test_fetch_step_does_not_retain_external_exception_context() -> None:
|
||||||
|
"""Vérifie qu'une erreur critique ne conserve ni secret ni contexte externe."""
|
||||||
|
with pytest.raises(PipelineCriticalError) as exc_info:
|
||||||
|
fetch_step(_FailingFetcher())
|
||||||
|
|
||||||
|
error = exc_info.value
|
||||||
|
formatted = "".join(traceback.format_exception(error))
|
||||||
|
assert "fetch-context-secret" not in str(error)
|
||||||
|
assert "fetch-context-secret" not in formatted
|
||||||
|
assert error.__cause__ is None
|
||||||
|
assert error.__context__ is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_production_raise_from_none_is_never_inside_except() -> None:
|
||||||
|
"""Vérifie structurellement que les exceptions expurgées sont levées hors des handlers."""
|
||||||
|
root = Path(__file__).parents[2] / "pronote_sync"
|
||||||
|
violations: list[str] = []
|
||||||
|
|
||||||
|
class Visitor(ast.NodeVisitor):
|
||||||
|
"""Collecte les levées ``from None`` imbriquées dans un handler."""
|
||||||
|
|
||||||
|
def __init__(self) -> None:
|
||||||
|
self._inside_except = False
|
||||||
|
|
||||||
|
def visit_ExceptHandler(self, node: ast.ExceptHandler) -> None:
|
||||||
|
"""Visite un handler en marquant son périmètre lexical."""
|
||||||
|
previous = self._inside_except
|
||||||
|
self._inside_except = True
|
||||||
|
self.generic_visit(node)
|
||||||
|
self._inside_except = previous
|
||||||
|
|
||||||
|
def visit_Raise(self, node: ast.Raise) -> None:
|
||||||
|
"""Signale une levée ``from None`` dans un handler."""
|
||||||
|
if (
|
||||||
|
self._inside_except
|
||||||
|
and isinstance(node.cause, ast.Constant)
|
||||||
|
and node.cause.value is None
|
||||||
|
):
|
||||||
|
violations.append(f"{path}:{node.lineno}")
|
||||||
|
self.generic_visit(node)
|
||||||
|
|
||||||
|
for path in sorted(root.rglob("*.py")):
|
||||||
|
Visitor().visit(ast.parse(path.read_text(encoding="utf-8")))
|
||||||
|
|
||||||
|
assert violations == []
|
||||||
Reference in New Issue
Block a user