Skip to content

fix: Remove .ipynb from mypy file extensions#7015

Merged
echoix merged 2 commits intooxsecurity:mainfrom
yousfiSaad:fix/mypy-remove-ipynb-extension
Jan 31, 2026
Merged

fix: Remove .ipynb from mypy file extensions#7015
echoix merged 2 commits intooxsecurity:mainfrom
yousfiSaad:fix/mypy-remove-ipynb-extension

Conversation

@yousfiSaad
Copy link
Contributor

@yousfiSaad yousfiSaad commented Jan 28, 2026

Summary

  • Remove .ipynb from mypy's file_extensions
  • Mypy doesn't natively support Jupyter notebooks

Problem

Fixes #6904

Since PR #6214, .ipynb was added to mypy's file extensions. However, mypy doesn't support Jupyter notebooks:

  • It parses the JSON structure directly
  • Fails on null values (e.g., execution_count in unexecuted cells)
  • Error: Name "null" is not defined

Solution

Remove .ipynb from mypy's file extensions. A separate PR will add PYTHON_NBQA_MYPY linter for proper notebook type-checking.

Changes

  • megalinter/descriptors/python.megalinter-descriptor.yml: Remove .ipynb from mypy file_extensions
  • CHANGELOG.md: Add bug fix entry

Related

Co-Authored-By: Claude noreply@anthropic.com


Note

Removes unsupported Jupyter notebook handling from MyPy configuration.

  • Updates python.megalinter-descriptor.yml to remove .ipynb from PYTHON_MYPY file_extensions
  • Adds CHANGELOG entry noting the fix (refs #6904)

Written by Cursor Bugbot for commit 88d3e33. This will update automatically on new commits. Configure here.

Mypy doesn't natively support .ipynb (Jupyter notebook) files. When
mypy encounters .ipynb files, it parses the JSON structure and fails on
null values (e.g., execution_count in unexecuted cells).

This commit removes .ipynb from mypy's file extensions to prevent these
errors. A separate PR will add PYTHON_NBQA_MYPY linter for proper
type-checking of Jupyter notebooks.

Fixes oxsecurity#6904

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Collaborator

@echoix echoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @nvuillam can you double-check trivy if the rerun fails again?

@echoix echoix enabled auto-merge (squash) January 28, 2026 10:43
Copy link
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks :)
We'll fix CI then update your branch and merge your PR ☺️

@cursor
Copy link

cursor bot commented Jan 31, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on February 6.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@echoix echoix merged commit 0396be0 into oxsecurity:main Jan 31, 2026
6 checks passed
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.

Mypy is wrongly used on .ipynb files

3 participants