Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display wrapper or external script code in report #1393 #1404


Copy link


Thanks for keeping snakemake this active!

This PR fixes #1393. It only remove the call to the decode() attribute of the source object (being either a script or a wrapper). From what I understood, such source object are read using with and open where the encoding is already taken care since Python 3 (link).

I tried to compare how the get_source function got the script or wrapper code in the actual release and the one mentioned where external code display still worked (v6.4.1).

I tried my best for generating the test, but seeing this is a visual inspection, I hope this is alright.


  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

@cpauvert cpauvert marked this pull request as ready for review February 16, 2022 16:50
Copy link

@cpauvert can you please format the code with black?

johanneskoester and others added 4 commits February 17, 2022 12:29

* Adding support for --cluster-[m]cancel

* Adding support for --cluster-[m]cancel.

* Adressing points from code review

* [ci skip] fix typos

Co-authored-by: Johannes Köster <>
…cpauvert/snakemake into fix1393-display-external-code-in-report
Copy link
Contributor Author

@cpauvert can you please format the code with black?

Thanks for the quick review @johanneskoester. And sorry for the bad formatting, it is better now in 9f5b62c

Copy link

sonarcloud bot commented Feb 17, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester johanneskoester merged commit a007bd1 into snakemake:main Feb 18, 2022
Copy link


@cpauvert cpauvert deleted the fix1393-display-external-code-in-report branch February 18, 2022 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

wrapper code and script code not displayed in report but shell code is
3 participants