Use Python 3.10 or higher to avoid error with unsupported types
@miorel y travaille déjà.
Depuis le 12/8/2024.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
With Python 3.9 in my local setup, I've seen this error when running yarn test:
==================================== ERRORS ====================================
__________________ ERROR collecting src/is_palindrome/test.py __________________
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
???
<frozen importlib._bootstrap>:1007: in _find_and_load
???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
???
<frozen importlib._bootstrap>:1030: in _gcd_import
???
<frozen importlib._bootstrap>:1007: in _find_and_load
???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:680: in _load_unlocked
???
<frozen importlib._bootstrap_external>:850: in exec_module
???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
???
src/is_palindrome/__init__.py:1: in <module>
def is_palindrome(sequence: list | str) -> bool:
E TypeError: unsupported operand type(s) for |: 'type' and 'type'
=========================== short test summary info ============================
ERROR src/is_palindrome/test.py - TypeError: unsupported operand type(s) for |: 'type' and 'type'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
To fix it, I had to update Python to 3.11, fix local path and regenerate .venv.
We should:
- update our documentation when we have a chance
- maybe log which version of Python is used
@miorel please add more requirements
- Langage dominant
- TypeScript
- Étoiles
- 20
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de code-chronicles-code/leetcode-curriculum
-
enhancement kotlin
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
good first issue tests
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
-
Add tests for `swap` utility Ouvertegood first issue tests
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
-
good first issue tests
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
code-chronicles-code/leetcode-curriculum#418 · 1 commentaire ·
Toutes les issues de code-chronicles-code/leetcode-curriculum
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
bcgov/bc-wallet-mobile#4761 · 1 commentaire ·
-
external-issue to-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
area-deployment area-integrations triage:bot-seen
Difficulté 2/5 Une demi-journée Accessibilité débutants 86/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
refactor
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100