mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
[python] requirements.txt: check entries regardless of dash/underscore in the package name (PY-65403, PY-70173)
Since pip [normalizes](https://github.com/pypa/packaging-problems/issues/230) underscores to dashes, PyCharm should treat them equally for requirements.txt entries GitOrigin-RevId: 62149b9c64c67936f1405c7bf282a288e8d52764
This commit is contained in:
committed by
intellij-monorepo-bot
parent
202b9dbc47
commit
625373b47a
@@ -25,7 +25,7 @@ data class PyRequirementImpl(private val name: String,
|
||||
|
||||
override fun match(packages: Collection<PyPackage>): PyPackage? {
|
||||
return packages.firstOrNull { `package` ->
|
||||
name.equals(`package`.name, true)
|
||||
name.replace('_', '-').equals(`package`.name.replace('_', '-'), true)
|
||||
&& versionSpecs.all { it.matches(`package`.version) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user