- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 04:07 AM
Hi all, I am trying to implement ruff linting in Gitlab CI/CD where I am only trying to catch undefined name errors ["F821"]. However it is picking up my magic commands like %sql and %pip as syntax errors and I am unable to exclude it in the pyproject.toml file.
When using %run to import functions from another notebook it will not recognise it as an import.
Has anyone tried to implement ruff in CI/CD and if so how did you get through this hurdle? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 08:17 AM
you're using ruff for linting. The issue with Databricks magic commands (%sql, %pip, %run) is that they're Databricks-specific syntax, not standard Python, so ruff treats them as errors. you should exclude databricks notebook from ruff.