Skip to content

python: a script with a python shebang and no .py extension is indexed (#1376) - #1379

Merged
swapnilpaliwal-sd merged 4 commits into
0.1.3from
fix/1376-python-shebang-scripts
Sep 26, 2026
Merged

swapnilpaliwal-sd merged 4 commits into
0.1.3from
fix/1376-python-shebang-scripts

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

Fixes #1376.

The parser collected only .py and .pyi files, so an executable Python script with no extension produced no symbols and no edges. An edit to it named no declaration, and its calls into the project's modules were missing from their callers.

  • Parser: a file with no extension whose first line is a python shebang is analysed as a module. Parser version 0.1.1.
  • Plugin: such scripts are watched for refresh, counted when the build picks a language, and read as Python by changed and impact. impact no longer lists a file the index read as source among the files it does not read.

On this repository indexed as Python, the graph now covers all 8 shebang scripts in git (24 plugin files, up from 9), and no shell script is picked up.

Test: tests/cases/python/shebang-script, with a shell script that runs python3 as the control. Its two shebang checks fail on the base branch and pass here. tests/run.py, tests/refresh.py and tests/indexed_tree.py pass.

swapnilpaliwal-sd and others added 4 commits September 26, 2026 12:13
0.1.3 is not published, so `npm install` from dev silently skipped every
engine package (they are optional) and the first index failed without a
local souffle. The 0.1.3 notes stay in CHANGELOG.md under Unreleased.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
Release notes live on each GitHub release; the file is not shipped to main.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
The installation notes from #1372 change the README, which ships in the npm
package, so the version gate needs a bump; bumping pins engine packages that
are not published yet. They return with the 0.1.3 release.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
#1376)

The parser collected only .py and .pyi files, so an executable script
named without an extension contributed no symbols and no edges: an edit
to it named no declaration, and calls from it into the project's modules
were missing from their callers. A file with no extension whose first
line is a python shebang is now analysed as a module. The plugin watches
and counts such scripts, reads them as Python in changed and impact, and
no longer lists them among the files the index does not read as source.

Parser version 0.1.1.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 4b7d797 into 0.1.3 Sep 26, 2026
7 of 8 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the fix/1376-python-shebang-scripts branch September 26, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant