smok-serwis/smok-client

View on GitHub
smok/client/client.py

Summary

Maintainability
D
2 days
Test Coverage
F
59%

File client.py has 685 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import datetime
import io
import logging
import os
import tempfile
Severity: Major
Found in smok/client/client.py - About 1 day to fix

    Function __init__ has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def __init__(self, cert: tp.Union[str, io.StringIO],
                     priv_key: tp.Union[str, io.StringIO],
                     evt_database: tp.Union[str, BaseEventDatabase],
                     pp_database: tp.Optional[BasePathpointDatabase] = None,
                     macro_database: tp.Optional[BaseMacroDatabase] = None,
    Severity: Major
    Found in smok/client/client.py - About 2 hrs to fix

      Function __init__ has 23 arguments (exceeds 15 allowed). Consider refactoring.
      Open

          def __init__(self, cert: tp.Union[str, io.StringIO],
      Severity: Major
      Found in smok/client/client.py - About 1 hr to fix

        Line too long (117 > 100 characters)
        Open

            that you are essentially not allowed to call the method itself. It will be called by respective processor thread.
        Severity: Minor
        Found in smok/client/client.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (106 > 100 characters)
        Open

                Prefer to call this than :meth:`smok.client.Client.provide_unknown_pathpoint`. This will be called
        Severity: Minor
        Found in smok/client/client.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (104 > 100 characters)
        Open

            Read carefully. If the documentation states that a particular thread invokes this method, this means
        Severity: Minor
        Found in smok/client/client.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (115 > 100 characters)
        Open

                To be invoked by any thread, as well as the user. Use this to inject sections into device's execution loop.
        Severity: Minor
        Found in smok/client/client.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (113 > 100 characters)
        Open

                a persistent TLS connection instead of HTTP API. This is both more efficient and bandwidth-saving instead
        Severity: Minor
        Found in smok/client/client.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        Line too long (115 > 100 characters)
        Open

                This will be called by the user. Note that :meth:`smok.sensor.Sensor.write` does not automatically generate
        Severity: Minor
        Found in smok/client/client.py by pep8

        Limit all lines to a maximum of 79 characters.

        There are still many devices around that are limited to 80 character
        lines; plus, limiting windows to 80 characters makes it possible to
        have several windows side-by-side.  The default wrapping on such
        devices looks ugly.  Therefore, please limit all lines to a maximum
        of 79 characters. For flowing long blocks of text (docstrings or
        comments), limiting the length to 72 characters is recommended.
        
        Reports error E501.

        There are no issues that match your filters.

        Category
        Status