Skip to content

Commit

Permalink
Tidy ruff rules
Browse files Browse the repository at this point in the history
  • Loading branch information
aaltat committed Oct 20, 2023
1 parent 8ff4955 commit fe05de8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
14 changes: 3 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,9 @@ exclude = '''
unfixable = []
exclude = [
"__pycache__",
"generated",
"wrapper",
"browser.pyi",
]
ignore = [
"B008", # do not perform function calls in argument defaults
"B904", # TODO only temporary. should be fixed.
"E501", # line too long
"N815", # mixedCase variable in class scope
"N803", # argument name should be lowercase
"N806", # variable in function should be lowercase
"N812", # lowercase imported as non lowercase
"N999", # Invalid module name: 'Browser'
"PLR0913", # too many arguments
]
target-version = "py38"
select = [
Expand Down Expand Up @@ -112,6 +101,9 @@ select = [
"RUF"
]

[tool.ruff.pylint]
max-args = 6

[tool.mypy]
[mypy]
python_version = 3.8
Expand Down
4 changes: 3 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def lint_robot(ctx):
@task(lint_robot)
def lint(ctx, error=False):
"""Lint Robot Framework test data and Python code."""
print("Lint python")
black_command = (
"black --config ./pyproject.toml assertionengine/ tasks.py atest/ utest/"
)
Expand All @@ -103,8 +102,11 @@ def lint(ctx, error=False):
black_command = f"{black_command} --check"
else:
ruff_command = f"{ruff_command} --fix"
print("Run mypy")
ctx.run("mypy --config-file ./pyproject.toml assertionengine/ utest/")
print("Run Black")
ctx.run(black_command)
print("Run Ruff")
ctx.run(ruff_command)


Expand Down

0 comments on commit fe05de8

Please sign in to comment.