pySCG: Python type hints and what they are for

Ouverte
#12 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
35/100
Type d'issue
Documentation
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
python

Piste de recherche

Read the existing content in ossf/python-secure-coding-guide#13 first to avoid duplication, then draft guidance on Python type hints, implicit conversions, mypy, and the limits of static checking for deployed input. Decide whether the content should be a recommendation or a rule after drafting it. Done means the guidance covers those points without duplicating issue #13.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Create a Python specific rule or recommendation around:

  • Type hints and what they are for. Python 3.9 does not even throw an INFO or warn when type hints don't match, it has to be clear that type hints are not a security or robustness feature.
  • Why type hints don't prevent implicit conversions
  • Why hints must be used in combination with a tool like mypy
  • Why or when mypy is unable to protect against issues on a deployed system.
    mypy != input sanitation or validation.
    Decide if its going to be a recommendation or rule after creating some content.

Avoid duplication with content in ossf/python-secure-coding-guide#13

Langage dominant
Python
Étoiles
2
Forks
2
Merge moyen
11 min
PR mergées (30 j)
2

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ossf/python-secure-coding-guide

Toutes les issues de ossf/python-secure-coding-guide

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.