Python/Linting: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
Line 9: Line 9:
| Disable function name and arguments only.<br/>(Single line mode is invalid here.) ||
| Disable function name and arguments only.<br/>(Single line mode is invalid here.) ||
<source lang="python">
<source lang="python">
    def OnConnection(self, nKind, nCode):
def OnNotifyTicks(self, sMarketNo, sStockidx, nPtr, \
        """
                      nDate, nTimehms, nTimemillis, \
        Function comment ...
                      nBid, nAsk, nClose, nQty, nSimulate):
        """
    """
        # pylint: disable=invalid-name
    Handle received ticks.
        # pylint: enable=invalid-name
    """
        V = 'must be reported'
    # pylint: disable=invalid-name, unused-argument, too-many-arguments
    # pylint: enable=invalid-name
</source>
</source>
|}
|}

Revision as of 09:50, 23 May 2019

Ignore some linting errors/warnings

See: https://pylint.readthedocs.io/en/latest/user_guide/message-control.html

TODO Code
Disable function name and arguments only.
(Single line mode is invalid here.)
def OnNotifyTicks(self, sMarketNo, sStockidx, nPtr, \
                      nDate, nTimehms, nTimemillis, \
                      nBid, nAsk, nClose, nQty, nSimulate):
    """
    Handle received ticks.
    """
    # pylint: disable=invalid-name, unused-argument, too-many-arguments
    # pylint: enable=invalid-name