alteryx / locust-grasshopper

a load testing tool extended from locust
Apache License 2.0
176 stars 8 forks source link

Update lint checks to include ruff format check as well in the pipeline #41

Closed devashish2203 closed 3 months ago

devashish2203 commented 3 months ago

We currently only run ruff check . in the PR Verification pipelines. We should also check formatting using ruff format --check .

jmfiola commented 3 months ago

We are using ruff in the pyproject.toml and the github pipeline, are you having any issues with it? Here's the relevant portion of the code:

[tool.ruff]
exclude = ["data-files", "docs", ".git", "__pycache__", "venv"]
src = ["src/*", "tests/unit/*"]
show-fixes = true
line-length = 88

[tool.ruff.lint]

# Adds Pyflakes, Mccabe, Pydocstyle, etc. run `ruff linter` to see all available linters
extend-select = ["F", "C90", "I", "N", "ICN"]
ignore = [ "N801", "N803", "N806", "N815", "N818", "E721"]

# Allows a single underscore to be an unused variable
dummy-variable-rgx = "^_$"

[tool.ruff.lint.mccabe]
max-complexity = 18

[tool.ruff.format]

[tool.ruff.lint.isort]
# order-by-type = false
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]

[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = ["property", "pytest.fixture", "locator"]
devashish2203 commented 3 months ago

Sorry I had looked at an older pull request and saw that the Checks were still using Black etc. Newer PRs are using ruff, but not for checking the formatting. Updated the title to be specific to ruff format

jmfiola commented 3 months ago

created a PR for this: https://github.com/alteryx/locust-grasshopper/pull/42

jmfiola commented 3 months ago

Fixed in 1.3.23!