Skip to content

Modes in pyproject.toml cannot be converted to octal #78

@nkakouros

Description

@nkakouros

I use flake8 together with the flake8-pyproject plugin to be able to use a single pyproejct.toml file for all my project's needs. I have the following config snippet:

os-mkdir-mode = 493  # 0o755
os-open-mode = 493  # 0o755
os-mkfifo-mode = 416  #0o640
os-mknod-mode = 416  #0o640

This triggers an error:

  File "/.../.venv/lib/python3.12/site-packages/flake8_secure_coding_standard.py", line 712, in _set_mode_option
    setattr(Visitor, f'os_{name}_modes_msg_arg', f'mode in {[oct(mode) for mode in modes]}')
                                                             ^^^^^^^^^
TypeError: 'str' object cannot be interpreted as an integer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions