Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

pre-commit hooks don't work with 2.3.37

Ouverte
#1,509 8 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
jupyter, python
Domaine
devtools

Piste de recherche

Commencez par comparer le code source GitHub de la version 2.3.37 aux métadonnées du paquet installé, en particulier nbdev/init.py, nbdev/showdoc.py et l’importation de fastcore.dispatch affichée dans le traceback. Relancez pre-commit run après avoir examiné comment le hook installe son environnement ; c’est terminé lorsque les hooks de 2.3.37 utilisent des versions de paquets compatibles et se terminent sans l’erreur de migration de fastcore.

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

Description

bug

Pre-commit hooks are installed from github directly. The source for tag 2.3.37 identifies the library version as 2.3.32 while the actual library install (via pypi) is identifying itself as 2.3.37. This has been true for a few past versions as well based on a quick look at the source. So in my environment nbdev is being installed at 2.3.37 with fastcore at 1.8. But the precommit hooks, while directed to 2.3.37 are triggering installs identifying themselves as 2.3.32 and 1.8. Theoretically I have the source for 2.3.37, but the version is just mislabeled, except that the hooks don't work.

The error below indicates the hook is trying to use source that hasn't been updated for fastcore 1.8, but I'm not sure why. I've uninstalled and cleaned the cache for my hooks before reinstalling. nbdev and fastcore work fine together when I call nbdev_clean/export manually. Those installs are coming from conda->pip and identify as their intended versions according to the init.py files in the conda sitepackages folder.

I thought this was a caching problem until I saw the 2.3.32 identifier in the github source.

pre-commit run
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/idahlke/.cache/pre-commit/patch1742504830-18983.
nbdev_clean..............................................................Failed

  • hook id: nbdev_clean
  • exit code: 1

Traceback (most recent call last):
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/bin/nbdev_clean", line 5, in
from nbdev.clean import nbdev_clean
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/lib/python3.10/site-packages/nbdev/init.py", line 4, in
from .showdoc import show_doc
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/lib/python3.10/site-packages/nbdev/showdoc.py", line 10, in
from fastcore.dispatch import TypeDispatch
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/lib/python3.10/site-packages/fastcore/dispatch.py", line 2, in getattr
raise ImportError(
ImportError: Could not import 'path' from fastcore.dispatch - this module has been moved to the fasttransform package.
To migrate your code, please see the migration guide at: https://answerdotai.github.io/fasttransform/fastcore_migration_guide.html

Langage dominant
Jupyter Notebook
Étoiles
5.3k
Forks
518
Merge moyen
1 j 3 h
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 AnswerDotAI/nbdev

Toutes les issues de AnswerDotAI/nbdev

Issues similaires

Plus d'issues DevTools

Recevez les nouvelles issues par e-mail

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