github / github/codeql

"codeql database create" command cannot recognize the relative path in "import" (Python/Go)

Open
#13,051 6 comments 0 reactions 0 assignees View on GitHub
Go Python question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

If the project use relative path to import module lilke below:
```
from ...moduleA import ClassA
import .moduleB
from ..mouduleC import ClassC
```
The ```. .. ... ``` will cause WARN when you use codeql database create, here is the log:
```
[2023-05-05 09:32:15] [build-stdout] [WARN] [1] Failed to find .xxx, no parent package of Python module at xxx.py
[2023-05-05 09:32:15] [build-stdout] [WARN] [2] Failed to find ..xxx, no parent package of Python module at xxxxx.py
[2023-05-05 09:32:15] [build-stdout] [WARN] [2] Failed to find ....xxxx, no parent package of Python module at xxxxxx.py
```
Python and Go has the same problem, how can I fix this WARN?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.