PY-33254 Added more patterns to cover more path functions from 'os', 'glob', 'shutil'

GitOrigin-RevId: 418cef341aad50157bce6a47959651f3ebc9501a
This commit is contained in:
Andrey Vlasovskikh
2019-10-16 18:24:09 +00:00
committed by intellij-monorepo-bot
parent 756c68de29
commit 99fd9dd2d7
@@ -100,6 +100,8 @@ class PySoftFileReferenceContributor : PsiReferenceContributor() {
private val PATTERNS = listOf(
Pattern("open", 0, isBuiltin = true),
Pattern("os.walk", 0),
Pattern("os.scandir", 0),
Pattern("pandas.read_csv", 0)
)
private val SIMPLE_NAMES = PATTERNS.associateBy { it.qualifiedName.lastComponent }
@@ -124,7 +126,11 @@ class PySoftFileReferenceContributor : PsiReferenceContributor() {
"path",
"file",
"filename",
"filepath"
"filepath",
"pathname",
"src",
"dst",
"dir"
)
private fun matchesPathNamePattern(name: String): Boolean {