IntelLabs / MART

Modular Adversarial Robustness Toolkit
BSD 3-Clause "New" or "Revised" License
17 stars 0 forks source link

Python's built-in function `input` is overriden by a variable #76

Open mzweilin opened 1 year ago

mzweilin commented 1 year ago

For example,

https://github.com/IntelLabs/MART/blob/2c62aad375e146036696e88c09f5cb3a0f7131fd/mart/models/modular.py#L103

This is not good, because static analysis tools may not understand the semantics of input in the code.

dxoigmn commented 1 year ago

The comment above this line is 🔑, although abusing primitive types is a bad idea too. Probably should be a dataclass that implements the mapping protocol so ** works.