Skip to content

Allow extend-allowed-calls for algopy.GlobalState #26

@cusma

Description

@cusma

Problem

Declaring a bool as GlobalState (e.g. ):

self.foo = GlobalState(True, description="A boolean")

Raises the following error on linting: FBT003 Boolean positional value in function call

Solution

Add the following Ruff config to pyproject.toml (@daniel-makerx):

[tool.ruff.lint.flake8-boolean-trap]
extend-allowed-calls = ["algopy.GlobalState"]

Dependencies

Needs ruff >= 0.3.5 (to be bumped in AlgoKit init requirements, as is currently set as ruff = "^0.1.6").

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions