.. _too-few-public-methods: too-few-public-methods / R0903 ============================== **Message emitted:** ``Too few public methods (%s/%s)`` **Description:** *Used when class has too few public methods, so be sure it's really worth it.* **Problematic code:** .. literalinclude:: /data/messages/t/too-few-public-methods/bad.py :language: python **Correct code:** ``dataclass_and_function.py``: .. literalinclude:: /data/messages/t/too-few-public-methods/good/dataclass_and_function.py :language: python ``function.py``: .. literalinclude:: /data/messages/t/too-few-public-methods/good/function.py :language: python ``larger_api.py``: .. literalinclude:: /data/messages/t/too-few-public-methods/good/larger_api.py :language: python Created by the `design `__ checker.