posit-dev / publisher

MIT License
4 stars 0 forks source link

Python Scan: imports without a space in a Notebook cell results in an incorrect package being added to requirements.txt #1769

Closed kgartland-rstudio closed 4 months ago

kgartland-rstudio commented 4 months ago

When adding an import to a cell in a notebook without a space, alias or new line after, we get something like this added to the requirements.txt file:

requestsimport

https://github.com/posit-dev/publisher/assets/41300090/63f262b8-1ebb-4fca-8a91-b6cfdd593a40

You can reproduce with this example: https://github.com/rstudio/connect-content/tree/kg-publisher/bundles/cell-import-bug