vatlab / sos

SoS workflow system for daily data analysis
http://vatlab.github.io/sos-docs
BSD 3-Clause "New" or "Revised" License
269 stars 45 forks source link

sos syntax conflict with Python dataclass #1507

Closed BoPeng closed 1 year ago

BoPeng commented 1 year ago

We recognize name: str as "action", but this conflicts with the dataclass stuff. It is best for us to disallow indented action name.

from dataclasses import dataclass

@dataclass
class InventoryItem:
    """Class for keeping track of an item in inventory."""
    name: str
    unit_price: float
    quantity_on_hand: int = 0