StellarCN/py-stellar-base

View on GitHub

Showing 97 of 2,517 total issues

Function __init__ has 7 arguments (exceeds 5 allowed). Consider refactoring.
Open

    def __init__(
Severity: Major
Found in stellar_sdk/operation/path_payment_strict_send.py - About 45 mins to fix

    Function __init__ has 7 arguments (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(
    Severity: Major
    Found in stellar_sdk/call_builder/base/base_trades_aggregation_call_builder.py - About 45 mins to fix

      Function _to_operation_body has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          def _to_operation_body(self) -> stellar_xdr.OperationBody:
              if self.revoke_sponsorship_type == RevokeSponsorshipType.ACCOUNT:
                  assert self.account_id is not None
                  account = stellar_xdr.LedgerKeyAccount(
                      Keypair.from_public_key(self.account_id).xdr_account_id()
      Severity: Minor
      Found in stellar_sdk/operation/revoke_sponsorship.py - About 45 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function trade_aggregations has 6 arguments (exceeds 5 allowed). Consider refactoring.
      Open

          def trade_aggregations(
      Severity: Minor
      Found in stellar_sdk/server_async.py - About 35 mins to fix

        Function __init__ has 6 arguments (exceeds 5 allowed). Consider refactoring.
        Open

            def __init__(
        Severity: Minor
        Found in stellar_sdk/operation/manage_sell_offer.py - About 35 mins to fix

          Function __init__ has 6 arguments (exceeds 5 allowed). Consider refactoring.
          Open

              def __init__(
          Severity: Minor
          Found in stellar_sdk/operation/create_claimable_balance.py - About 35 mins to fix

            Function append_manage_sell_offer_op has 6 arguments (exceeds 5 allowed). Consider refactoring.
            Open

                def append_manage_sell_offer_op(
            Severity: Minor
            Found in stellar_sdk/transaction_builder.py - About 35 mins to fix

              Function append_liquidity_pool_deposit_op has 6 arguments (exceeds 5 allowed). Consider refactoring.
              Open

                  def append_liquidity_pool_deposit_op(
              Severity: Minor
              Found in stellar_sdk/transaction_builder.py - About 35 mins to fix

                Function trade_aggregations has 6 arguments (exceeds 5 allowed). Consider refactoring.
                Open

                    def trade_aggregations(
                Severity: Minor
                Found in stellar_sdk/base_server.py - About 35 mins to fix

                  Function append_manage_buy_offer_op has 6 arguments (exceeds 5 allowed). Consider refactoring.
                  Open

                      def append_manage_buy_offer_op(
                  Severity: Minor
                  Found in stellar_sdk/transaction_builder.py - About 35 mins to fix

                    Function __init__ has 6 arguments (exceeds 5 allowed). Consider refactoring.
                    Open

                        def __init__(
                    Severity: Minor
                    Found in stellar_sdk/preconditions.py - About 35 mins to fix

                      Function __init__ has 6 arguments (exceeds 5 allowed). Consider refactoring.
                      Open

                          def __init__(
                      Severity: Minor
                      Found in stellar_sdk/operation/manage_buy_offer.py - About 35 mins to fix

                        Function trade_aggregations has 6 arguments (exceeds 5 allowed). Consider refactoring.
                        Open

                            def trade_aggregations(
                        Severity: Minor
                        Found in stellar_sdk/server.py - About 35 mins to fix

                          Function __init__ has 6 arguments (exceeds 5 allowed). Consider refactoring.
                          Open

                              def __init__(
                          Severity: Minor
                          Found in stellar_sdk/operation/liquidity_pool_deposit.py - About 35 mins to fix

                            Function verify_challenge_transaction_signers has 6 arguments (exceeds 5 allowed). Consider refactoring.
                            Open

                            def verify_challenge_transaction_signers(
                            Severity: Minor
                            Found in stellar_sdk/sep/stellar_web_authentication.py - About 35 mins to fix

                              Function append_create_contract_op has 6 arguments (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def append_create_contract_op(
                              Severity: Minor
                              Found in stellar_sdk/transaction_builder.py - About 35 mins to fix

                                Function _decode_memo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def _decode_memo(
                                        memo_type: Optional[str], memo_value: Optional[str]
                                    ) -> Optional[Memo]:
                                        if memo_type is None:
                                            return None
                                Severity: Minor
                                Found in stellar_sdk/sep/stellar_uri.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def __init__(
                                        self,
                                        source: Union[MuxedAccount, Keypair, str],
                                        sequence: int,
                                        fee: int,
                                Severity: Minor
                                Found in stellar_sdk/transaction.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function to_xdr_object has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def to_xdr_object(
                                        self,
                                    ) -> Union[stellar_xdr.Transaction, stellar_xdr.TransactionV0]:
                                        """Get an XDR object representation of this :class:`Transaction`.
                                
                                
                                Severity: Minor
                                Found in stellar_sdk/transaction.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function append_create_contract_op has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def append_create_contract_op(
                                        self,
                                        wasm_id: Union[bytes, str],
                                        address: Union[str, Address],
                                        constructor_args: Optional[Sequence[stellar_xdr.SCVal]] = None,
                                Severity: Minor
                                Found in stellar_sdk/transaction_builder.py - About 35 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language