Commit Graph

10 Commits

Author SHA1 Message Date
Andrey Vlasovskikh
660264ad98 PY-51228 Added the description for the Poetry package versions inspection
GitOrigin-RevId: 7fb7fe86cf614274b183755794cf1dda6eb7e5d2
2021-10-20 23:59:40 +00:00
Semyon Proshev
96ca67b701 Remove support for buildout (PY-49193)
GitOrigin-RevId: 6c9e582d92b7c1c5f43648022abe315906e2786c
2021-09-14 17:08:51 +00:00
Semyon Proshev
cf78619d36 Update python inspections' descriptions (PY-48274)
GitOrigin-RevId: 4ee6b7ef7e51a697e4d52a06b87cf599c79366a0
2021-04-30 10:35:14 +00:00
andrey.matveev
c5ae9550ce PY-42750 Allow same directory imports in Python 3 and introduce explicit namespace packages
There are 3 types of directories: plain directories, ordinary packages (with
__init__.py) and PEP 420 namespace packages. There are 3 types of imports:
absolute (from a root), same directory (absolute import from the current
directory when it's not explicitly marked as a root) and relative imports
(imports that start with dot).

Absolute imports are correct in all kinds of directories.
Same directory imports are correct in Python 2 in all cases and in Python 3 if
we have the directory containing the script with this import in Python path at
runtime. Users of Python 3 often face the problem when they can run the script
from the console because the directory containing this script got into Python
path but still have red underline and an unresolved reference error in the same
directory import because PyCharm didn't know that this file will be used as a
program's entry point. Previously, the way to fix such a problem was marking it
as a source root. But this action was not so obvious, especially for newcomers.
With this feature, such imports resolve successfully and now it is not necessary
to mark directories as source roots.

Relative imports are correct only in Python 3 namespace or ordinary packages and
should not be used in plain directories. If we have a relative import in plain
directory we highlight it with a weak warning and suggest 2 ways of fixing that:
marking directory as a namespace package explicitly (with quick fix or with Mark
As | Namespace Package) or changing this import to the same directory import
with a quickfix or manually.

Explicitly marking namespace packages can later be used for automatically
running files from them and ordinary packages with "-m".
The new resolve policy and explicit namespace packages can be disabled with the
Registry flag "python.explicit.namespace.packages".

These changes also address PY-40396. Namely, now any directory with __init__.py
inside or explicitly marked as a namespace package has a package icon,
regardless of its name or parents.

GitOrigin-RevId: 310fa562eb60121243cb6d68386ffc3e45c73245
2020-10-21 16:04:26 +00:00
Dmitry Trofimov
d799d9d4d7 Move other Python inspections to python-psi-impl
GitOrigin-RevId: 71e300329addb702f3f603f58174f3f16e688ad6
2020-03-30 15:02:49 +00:00
Dmitry Trofimov
dcede6feba Move some Python inspections to python-psi module
GitOrigin-RevId: e4e99dba19da999b1af74a464e8d5c9134947ab3
2020-03-25 17:17:50 +00:00
Dmitry Trofimov
604b58bf05 Initialize CLI inspections in xml
GitOrigin-RevId: a817761191b470fc7be4932f377f557eb0468f98
2020-03-23 19:33:59 +00:00
Andrey Vlasovskikh
7b2d0ce401 Moved PyTypedDictInspection.html from PyCharm IDE resources to the Python Community plugin resources
Python inspections are defined in the Python Community plugin, not in the PyCharm IDE, since they have
to be available e.g. in IntelliJ with Python Community plugin installed.

GitOrigin-RevId: e2e2af5bade75e93a22cb07bfa37b7fbf49b0596
2019-12-20 14:44:33 +00:00
Semyon Proshev
46b4ad1773 Update descriptions for PEP 8 codestyle inspections (PY-33490)
GitOrigin-RevId: b8ec517935abfda8c4083b6bd318a4ffa61bb7ee
2019-11-20 12:07:39 +00:00
Gregory.Shrago
823ef2b176 IDEA-CR-53226 move python resources to pluginResources root
GitOrigin-RevId: 3d76a0b29748d9f0e5593f87eeb66ce1bfdd81bc
2019-10-09 13:06:32 +00:00