Open cusma opened 2 months ago
Declaring a bool as GlobalState (e.g. ):
bool
GlobalState
self.foo = GlobalState(True, description="A boolean")
Raises the following error on linting: FBT003 Boolean positional value in function call
FBT003 Boolean positional value in function call
Add the following Ruff config to pyproject.toml (@daniel-makerx):
pyproject.toml
[tool.ruff.lint.flake8-boolean-trap] extend-allowed-calls = ["algopy.GlobalState"]
Needs ruff >= 0.3.5 (to be bumped in AlgoKit init requirements, as is currently set as ruff = "^0.1.6").
ruff >= 0.3.5
ruff = "^0.1.6"
@daniel-makerx i suppose unless there is a way to ignore a specific rule in specific file (containing puya imports) the only workaround is to tweak the stub itself ?
Problem
Declaring a
bool
asGlobalState
(e.g. ):Raises the following error on linting:
FBT003 Boolean positional value in function call
Solution
Add the following Ruff config to
pyproject.toml
(@daniel-makerx):Dependencies
Needs
ruff >= 0.3.5
(to be bumped in AlgoKit init requirements, as is currently set asruff = "^0.1.6"
).