You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add a linter step as part of our testing infrastructure for SIMPLE. I recommend using ruff with a toml file for handling settings.
This is what I've used before as a run_lint.sh script:
#!/usr/bin/env bash# Requires ruff in the current environment# Summaryecho"Summary"
ruff check . --config=pyproject.toml --statistics
# To fix issues (eg, import sorting):# ruff check . --config=pyproject.toml --statistics --fix# Main invocationecho"\nDetails"
ruff check . --config=pyproject.toml --exit-zero
where pyproject.toml contains something like:
[tool.ruff.lint]# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or# McCabe complexity (`C901`) by default.# See https://docs.astral.sh/ruff/rules/select = ["E4", "E7", "E9", "F", "I", "PL", "C901", "RUF010"]#select = ["ALL"]ignore = ["PLR", # pylint refactor"E701", # multiple statements on one line (revisit?)]# Allow fix for all enabled rules (when `--fix`) is provided.fixable = ["ALL"]unfixable = [][tool.ruff]line-length = 120src = ["src"]exclude = ["test"][tool.ruff.lint.mccabe]# Flag errors (`C901`) whenever the complexity level exceeds this number.max-complexity = 10
The text was updated successfully, but these errors were encountered:
I am more inclined to set this up in astrodb_utils since I think we should hold that code to a higher standard while I think of SIMPLE as more of a testbed.
I would also like to include instructions in our dev docs for adding this to ones VS Code setup.
We should add a linter step as part of our testing infrastructure for SIMPLE. I recommend using ruff with a toml file for handling settings.
This is what I've used before as a run_lint.sh script:
where pyproject.toml contains something like:
The text was updated successfully, but these errors were encountered: