Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

validate_country prints "Validating country" on every request

Offen
#3,909 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@anth-volk arbeitet bereits daran.

Seit 13.10.2026.

  • #3915 von @anth-volk — offen

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
backend

Rechercherichtung

The stray output is the print("Validating country") call in policyengine_api/utils/payload_validators/validate_country.py, which runs before the country check in the decorator. Remove the call or swap it for a module-level logger.debug, following the logging setup the rest of the API uses. Pull request #3915 is already open against this issue, so check it before starting; this issue is not a good first pick unless that pull request is abandoned.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

The validate_country decorator (policyengine_api/utils/payload_validators/validate_country.py) calls print("Validating country") before checking the country, so every request to a route it wraps writes that line to stdout.

It is debugging output: it carries no request context, bypasses the logging configuration, and adds noise to the service logs.

Expected

Remove the print, or replace it with a logger.debug call if the trace is still useful.

Notes

  • Found while documenting the code for the ruff docstring rules; left unchanged there.
  • Ruff's T20 family, planned for a later lint group, will flag this and any other print calls.
Vorherrschende Sprache
Python
Sterne
18
Forks
33
Ø Merge
1 T. 20 Std.
Gemergte PRs (30 T.)
27

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus PolicyEngine/policyengine-api

Alle Issues in PolicyEngine/policyengine-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.