nabehide/TradeDerPy

View on GitHub

Showing 28 of 28 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if len(candidate) == 0:
            message = timeStamp() + "Fail sell profirable: No candidate"
            if self.debug:
                print(message)
            return message
Severity: Major
Found in TradeDerPy/TradeDerPy.py and 1 other location - About 1 day to fix
TradeDerPy/TradeDerPy.py on lines 346..364

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 203.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if len(candidate) == 0:
            message = timeStamp() + "Fail sell CutLoss: No candidate"
            if self.debug:
                print(message)
            return message
Severity: Major
Found in TradeDerPy/TradeDerPy.py and 1 other location - About 1 day to fix
TradeDerPy/TradeDerPy.py on lines 371..389

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 203.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File TradeDerPy.py has 353 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-

import re
import random
from datetime import datetime
Severity: Minor
Found in TradeDerPy/TradeDerPy.py - About 4 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                self.asset = int(soup.select(".leftTable")[0].select(
                    ".downRow")[0].select(".alR")[0].text[:-1].replace(",", ""))
    Severity: Major
    Found in TradeDerPy/TradeDerPy.py and 1 other location - About 3 hrs to fix
    TradeDerPy/TradeDerPy.py on lines 174..175

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                self.power = int(soup.select(".leftTable")[0].select(
                    ".downRow")[2].select(".alR")[0].text[:-1].replace(",", ""))
    Severity: Major
    Found in TradeDerPy/TradeDerPy.py and 1 other location - About 3 hrs to fix
    TradeDerPy/TradeDerPy.py on lines 172..173

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function search has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

        def search(self, variables):
            queryTraded = "&traded=true" if variables["traded"] else ""
            queryCommand = "&command=" + variables["command"]
            queryIdx1 = "&idx1=true" if variables["idx1"] else "&idx1=" if variables["idx1"] is None else "&idx1=false"
            queryMinUnitPrice = "&lospl=" if variables["minUnitPrice"] is None else "&lospl=" + str(variables["minUnitPrice"])
    Severity: Minor
    Found in TradeDerPy/TradeDerPy.py - About 2 hrs 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

    TradeDerPy has 21 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class TradeDerPy(object):
    
        def __init__(self, account, config):
            self.username = account["username"]
            self.password = account["password"]
    Severity: Minor
    Found in TradeDerPy/TradeDerPy.py - About 2 hrs to fix

      Function getHold has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          def getHold(self):
              self.hold = pd.DataFrame(columns=self.columnsHold)
      
              self.driver.get(mainURL + PositionHoldPath)
              soup, text = self._getSoupText()
      Severity: Minor
      Found in TradeDerPy/TradeDerPy.py - About 2 hrs 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 getSuggested has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

          def getSuggested(self):
              self.suggested = pd.DataFrame(columns=self.columnsSuggested)
      
              variables = defaultSearchVariables
              variables["suggest"] = 2
      Severity: Minor
      Found in TradeDerPy/TradeDerPy.py - About 1 hr 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

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if 0 < len(soup.select(".state_2")) and not self.status:
                      self.status = True if soup.select(".state_2")[0].select(
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 1 other location - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 176..177

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 45.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if 0 < len(soup.select(".state_1")):
                      self.status = True if soup.select(".state_1")[0].select(
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 1 other location - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 179..180

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 45.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMinmkcp = "&mkcpl=" if variables["minmkcp"] is None else "&mkcpl=" + str(variables["minmkcp"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 80..80
      TradeDerPy/TradeDerPy.py on lines 81..81
      TradeDerPy/TradeDerPy.py on lines 83..83
      TradeDerPy/TradeDerPy.py on lines 84..84
      TradeDerPy/TradeDerPy.py on lines 85..85
      TradeDerPy/TradeDerPy.py on lines 86..86
      TradeDerPy/TradeDerPy.py on lines 87..87

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMaxmkcp = "&mkcph=" if variables["maxmkcp"] is None else "&mkcph=" + str(variables["maxmkcp"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 80..80
      TradeDerPy/TradeDerPy.py on lines 81..81
      TradeDerPy/TradeDerPy.py on lines 82..82
      TradeDerPy/TradeDerPy.py on lines 84..84
      TradeDerPy/TradeDerPy.py on lines 85..85
      TradeDerPy/TradeDerPy.py on lines 86..86
      TradeDerPy/TradeDerPy.py on lines 87..87

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMinPER = "&cperl=" if variables["minPER"] is None else "&cperl=" + str(variables["minPER"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 80..80
      TradeDerPy/TradeDerPy.py on lines 81..81
      TradeDerPy/TradeDerPy.py on lines 82..82
      TradeDerPy/TradeDerPy.py on lines 83..83
      TradeDerPy/TradeDerPy.py on lines 84..84
      TradeDerPy/TradeDerPy.py on lines 85..85
      TradeDerPy/TradeDerPy.py on lines 87..87

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMaxUnitPrice = "&losph=" if variables["maxUnitPrice"] is None else "&losph=" + str(variables["maxUnitPrice"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 80..80
      TradeDerPy/TradeDerPy.py on lines 82..82
      TradeDerPy/TradeDerPy.py on lines 83..83
      TradeDerPy/TradeDerPy.py on lines 84..84
      TradeDerPy/TradeDerPy.py on lines 85..85
      TradeDerPy/TradeDerPy.py on lines 86..86
      TradeDerPy/TradeDerPy.py on lines 87..87

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMinPBR = "&cpbrl=" if variables["minPBR"] is None else "&cpbrl=" + str(variables["minPBR"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 80..80
      TradeDerPy/TradeDerPy.py on lines 81..81
      TradeDerPy/TradeDerPy.py on lines 82..82
      TradeDerPy/TradeDerPy.py on lines 83..83
      TradeDerPy/TradeDerPy.py on lines 85..85
      TradeDerPy/TradeDerPy.py on lines 86..86
      TradeDerPy/TradeDerPy.py on lines 87..87

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMaxPER = "&cperh=" if variables["maxPER"] is None else "&cperh=" + str(variables["maxPER"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 80..80
      TradeDerPy/TradeDerPy.py on lines 81..81
      TradeDerPy/TradeDerPy.py on lines 82..82
      TradeDerPy/TradeDerPy.py on lines 83..83
      TradeDerPy/TradeDerPy.py on lines 84..84
      TradeDerPy/TradeDerPy.py on lines 85..85
      TradeDerPy/TradeDerPy.py on lines 86..86

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMinUnitPrice = "&lospl=" if variables["minUnitPrice"] is None else "&lospl=" + str(variables["minUnitPrice"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 81..81
      TradeDerPy/TradeDerPy.py on lines 82..82
      TradeDerPy/TradeDerPy.py on lines 83..83
      TradeDerPy/TradeDerPy.py on lines 84..84
      TradeDerPy/TradeDerPy.py on lines 85..85
      TradeDerPy/TradeDerPy.py on lines 86..86
      TradeDerPy/TradeDerPy.py on lines 87..87

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

              queryMaxPBR = "&cpbrh=" if variables["maxPBR"] is None else "&cpbrh=" + str(variables["maxPBR"])
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 7 other locations - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 80..80
      TradeDerPy/TradeDerPy.py on lines 81..81
      TradeDerPy/TradeDerPy.py on lines 82..82
      TradeDerPy/TradeDerPy.py on lines 83..83
      TradeDerPy/TradeDerPy.py on lines 84..84
      TradeDerPy/TradeDerPy.py on lines 86..86
      TradeDerPy/TradeDerPy.py on lines 87..87

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 39.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

              unit = int(soup.select(".boxb")[0].find(
                         id="hd_stock").text.replace(",", ""))
      Severity: Major
      Found in TradeDerPy/TradeDerPy.py and 1 other location - About 1 hr to fix
      TradeDerPy/TradeDerPy.py on lines 119..120

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 38.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language