Skip to content

Add support for CommonServerUserPython config in pre-commit#5274

Open
tlium wants to merge 2 commits intodemisto:masterfrom
tlium:pre-commit-path-to-commonserveruserpython
Open

Add support for CommonServerUserPython config in pre-commit#5274
tlium wants to merge 2 commits intodemisto:masterfrom
tlium:pre-commit-path-to-commonserveruserpython

Conversation

@tlium
Copy link
Copy Markdown
Contributor

@tlium tlium commented Mar 9, 2026

Add support for CommonServerUserPython config in [pre-commit] section in .demisto-sdk-conf

Read the directory from .demisto-sdk-conf and add it to PYTHONPATH if configured, otherwise create an empty stub file. This prevents import errors for integrations/scripts using CommonServerUserPython.

This fixes the annoying situation where demisto-sdk creates an empty CommonServerUserPython.py file in the root of the content repository. Chances are users will have this file as part of a content pack instead. It also allows for a cleaner project root.

relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-16213

Read the directory from .demisto-sdk-conf and add it to PYTHONPATH if
configured, otherwise create an empty stub file. This prevents import
errors for integrations/scripts using CommonServerUserPython.
@tlium tlium requested a review from a team as a code owner March 9, 2026 07:05
@github-actions github-actions Bot added the Contribution Thank you! Contributions are always welcome! label Mar 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 9, 2026

Thank you for your contribution. Your willingness to improve our product and contribute to our community is highly appreciated. For your convenience, here is a link to the contributions SLAs document.

@BEAdi BEAdi assigned yedidyacohenpalo and unassigned kamalq97 Mar 15, 2026
@BarGali BarGali changed the title Add support for CommonServerUserPython config in pre-commit Add support for CommonServerUserPython config in pre-commit! Mar 15, 2026
@BarGali BarGali changed the title Add support for CommonServerUserPython config in pre-commit! Add support for CommonServerUserPython config in pre-commit Mar 15, 2026
@merit-maita merit-maita reopened this Mar 15, 2026
@tlium
Copy link
Copy Markdown
Contributor Author

tlium commented Mar 15, 2026

This PR might warrant some further testing. I need help determining if this PR will break anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution Thank you! Contributions are always welcome!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants