Hello @secsilm,
\nIt depends on which Python version you are setting when using isort
. If you're running Python 3.13, you can try the following command:
isort --py 313 <name_of_your_file.py>
This ensures that parser is correctly sorted for that Python version.
\nWhy does this happen?
\nWhen you don't specify the Python version, isort
creates a set containing all standard library packages available across all Python 3.X versions. Since parser was removed in Python 3.10, it is still included when isort
considers older versions.
parser
as built-in package?
#2290
-
import time
from parser import CategoryParser, TagParser # <--- HERE
from typing import Tuple
from dateutil.parser import parse as parsedate
from loguru import logger
from data_types import CategoryResult, News, TagResult
from utils import clean_text |
Beta Was this translation helpful? Give feedback.
-
Hello @secsilm, It depends on which Python version you are setting when using isort --py 313 <name_of_your_file.py> This ensures that parser is correctly sorted for that Python version. Why does this happen? When you don't specify the Python version, |
Beta Was this translation helpful? Give feedback.
Hello @secsilm,
It depends on which Python version you are setting when using
isort
. If you're running Python 3.13, you can try the following command:This ensures that parser is correctly sorted for that Python version.
Why does this happen?
When you don't specify the Python version,
isort
creates a set containing all standard library packages available across all Python 3.X versions. Since parser was removed in Python 3.10, it is still included whenisort
considers older versions.