SylvainDe/ComicBookMaker

View on GitHub
comics.py

Summary

Maintainability
F
3 wks
Test Coverage

File comics.py has 5211 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#! /usr/bin/python3
# vim: set expandtab tabstop=4 shiftwidth=4 :
"""Module to retrieve webcomics"""

from comic_abstract import GenericComic, get_date_for_comic
Severity: Major
Found in comics.py - About 2 wks to fix

    Function check_prev_next_links has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        def check_prev_next_links(cls, url):
            """Check that navigation to prev/next from a given URL seems to be working - for dev purposes."""
            cls.log("about to check prev/next from %s" % url)
            ok = True
            if url is None:
    Severity: Minor
    Found in comics.py - About 3 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 get_next_comic has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_next_comic(cls, last_comic):
            """Generic implementation of get_next_comic for listable comics."""
            waiting_for_url = last_comic["url"] if last_comic else None
            archive_elts = list(cls.get_archive_elements())
            for archive_elt in archive_elts:
    Severity: Minor
    Found in comics.py - About 55 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 get_next_comic has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_next_comic(cls, last_comic):
            """Generic implementation of get_next_comic for navigable comics."""
            url = last_comic["url"] if last_comic else None
            cls.log("starting 'get_next_comic' from %s" % url)
            next_comic = (
    Severity: Minor
    Found in comics.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 get_navi_link has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            link = last_soup.find("link", rel="next" if next_ else "prev")
            # Workaround because a page leads to 404 error
            if link:
    Severity: Minor
    Found in comics.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 get_next_comic has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_next_comic(cls, last_comic):
            """Generator to get the next comic. Implementation of GenericComic's abstract method."""
            json_url = urljoin_wrapper(cls.url, "feed/json/")
            json = load_json_at_url(json_url)
            first_num = last_comic["num"] if last_comic else 0
    Severity: Minor
    Found in comics.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 get_navi_link has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            # Based on get_a_comicnavbase_comicnavnext but with workaround
            link = last_soup.find(
                "a",
    Severity: Minor
    Found in comics.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

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

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            # Based on get_a_comicnavbase_comicnavnext but with workaround
            link = last_soup.find(
    Severity: Major
    Found in comics.py and 1 other location - About 4 hrs to fix
    comics.py on lines 2935..2946

    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 85.

    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

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            link = last_soup.find("link", rel="next" if next_ else "prev")
            # Workaround because a page leads to 404 error
    Severity: Major
    Found in comics.py and 1 other location - About 4 hrs to fix
    comics.py on lines 3643..3660

    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 85.

    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

        @classmethod
        def get_comic_info(cls, soup, archive_elt):
            """Get information about a particular comics."""
            title = soup.find("meta", property="og:title")["content"]
            imgs = soup.find_all("meta", property="og:image")
    Severity: Major
    Found in comics.py and 1 other location - About 3 hrs to fix
    comics.py on lines 3522..3529

    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 72.

    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

        @classmethod
        def get_comic_info(cls, soup, link):
            """Get information about a particular comics."""
            title = soup.find("meta", property="og:title")["content"]
            imgs = soup.find_all("meta", property="og:image")
    Severity: Major
    Found in comics.py and 1 other location - About 3 hrs to fix
    comics.py on lines 2409..2416

    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 72.

    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

            try:
                get_soup_at_url(last_url)
            except urllib.error.HTTPError:
                try:
                    get_soup_at_url(cls.url)
    Severity: Major
    Found in comics.py and 1 other location - About 3 hrs to fix
    comics.py on lines 4295..4307

    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

            try:
                get_soup_at_url(last_api_url)
            except urllib.error.HTTPError:
                try:
                    get_soup_at_url(cls.url)
    Severity: Major
    Found in comics.py and 1 other location - About 3 hrs to fix
    comics.py on lines 6247..6259

    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

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            for link in last_soup.find_all("a", id="nav-next" if next_ else "nav-prev"):
                if link["href"] != "http://www.sheldoncomics.com":
    Severity: Major
    Found in comics.py and 1 other location - About 2 hrs to fix
    comics.py on lines 2813..2819

    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 57.

    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

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            for link in last_soup.find_all("a", rel="next" if next_ else "prev"):
                if link["href"] != "/comic":
    Severity: Major
    Found in comics.py and 1 other location - About 2 hrs to fix
    comics.py on lines 3546..3552

    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 57.

    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 5 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            link = last_soup.find(
                "div", class_="nav-comic nav-right" if next_ else "nav-comic nav-left"
    Severity: Major
    Found in comics.py and 4 other locations - About 1 hr to fix
    comics.py on lines 771..775
    comics.py on lines 834..839
    comics.py on lines 3368..3373
    comics.py on lines 4111..4115

    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 49.

    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 5 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            # prev is next / next is prev
            li = last_soup.find("li", class_="prev" if next_ else "next")
    Severity: Major
    Found in comics.py and 4 other locations - About 1 hr to fix
    comics.py on lines 771..775
    comics.py on lines 834..839
    comics.py on lines 1120..1126
    comics.py on lines 4111..4115

    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 49.

    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 5 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            li = last_soup.find("li", class_="link-next" if next_ else "link-prev")
            return li.find("a") if li else None
    Severity: Major
    Found in comics.py and 4 other locations - About 1 hr to fix
    comics.py on lines 834..839
    comics.py on lines 1120..1126
    comics.py on lines 3368..3373
    comics.py on lines 4111..4115

    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 49.

    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 5 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            # prev is next / next is prev
            li = last_soup.find("li", class_="prev" if next_ else "next")
    Severity: Major
    Found in comics.py and 4 other locations - About 1 hr to fix
    comics.py on lines 771..775
    comics.py on lines 1120..1126
    comics.py on lines 3368..3373
    comics.py on lines 4111..4115

    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 49.

    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 5 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            li = last_soup.find("li", class_="prev" if next_ else "next")
            return li.find("a") if li else None
    Severity: Major
    Found in comics.py and 4 other locations - About 1 hr to fix
    comics.py on lines 771..775
    comics.py on lines 834..839
    comics.py on lines 1120..1126
    comics.py on lines 3368..3373

    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 49.

    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

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            img = last_soup.find("img", alt="Next Comic" if next_ else "Previous Comic")
            return img.parent if img else None
    Severity: Major
    Found in comics.py and 1 other location - About 1 hr to fix
    comics.py on lines 3516..3520

    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

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            img = last_soup.find("img", alt="Next" if next_ else "Back")
            return img.parent if img else None
    Severity: Major
    Found in comics.py and 1 other location - About 1 hr to fix
    comics.py on lines 872..876

    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

        @classmethod
        def get_prev_link(cls, last_soup):
            """Get link to previous comic."""
            link = cls.get_navi_link(last_soup, False)
            cls.log("Prev link is %s" % link)
    Severity: Major
    Found in comics.py and 1 other location - About 1 hr to fix
    comics.py on lines 164..169

    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 42.

    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

        @classmethod
        def get_next_link(cls, last_soup):
            """Get link to next comic."""
            link = cls.get_navi_link(last_soup, True)
            cls.log("Next link is %s" % link)
    Severity: Major
    Found in comics.py and 1 other location - About 1 hr to fix
    comics.py on lines 171..176

    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 42.

    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

        @classmethod
        def get_archive_elements(cls):
            archive_url = urljoin_wrapper(cls.url, "archives/")
            return reversed(
                get_soup_at_url(archive_url).find_all("td", class_="archive-title")
    Severity: Major
    Found in comics.py and 1 other location - About 1 hr to fix
    comics.py on lines 1956..1959

    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 41.

    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

        @classmethod
        def get_archive_elements(cls):
            archive_url = urljoin_wrapper(cls.url, "archive/")
            return reversed(get_soup_at_url(archive_url).find_all("a", rel="bookmark"))
    Severity: Major
    Found in comics.py and 1 other location - About 1 hr to fix
    comics.py on lines 2229..2233

    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 41.

    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

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return get_soup_at_url(cls.url).find("li", class_="link-first").find("a")
    Severity: Minor
    Found in comics.py and 1 other location - About 50 mins to fix
    comics.py on lines 3337..3340

    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 36.

    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

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return get_soup_at_url(cls.url).find("li", class_="first").find("a")
    Severity: Minor
    Found in comics.py and 1 other location - About 50 mins to fix
    comics.py on lines 766..769

    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 36.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] == alt for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2153..2153
    comics.py on lines 2251..2251
    comics.py on lines 2296..2296
    comics.py on lines 2884..2884
    comics.py on lines 3248..3248
    comics.py on lines 3278..3278
    comics.py on lines 3311..3311

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] == alt for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2153..2153
    comics.py on lines 2251..2251
    comics.py on lines 2296..2296
    comics.py on lines 2858..2858
    comics.py on lines 2884..2884
    comics.py on lines 3248..3248
    comics.py on lines 3278..3278

    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 35.

    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 3 locations. Consider refactoring.
    Open

                    if comic is not None:
                        assert "url" not in comic
                        comic["url"] = url
                        yield comic
    Severity: Major
    Found in comics.py and 2 other locations - About 45 mins to fix
    comics.py on lines 51..54
    comics.py on lines 199..202

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] == alt for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2153..2153
    comics.py on lines 2251..2251
    comics.py on lines 2296..2296
    comics.py on lines 2858..2858
    comics.py on lines 2884..2884
    comics.py on lines 3248..3248
    comics.py on lines 3311..3311

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["title"] == i["alt"] == title for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 2153..2153
    comics.py on lines 2251..2251
    comics.py on lines 2296..2296
    comics.py on lines 2858..2858
    comics.py on lines 2884..2884
    comics.py on lines 3248..3248
    comics.py on lines 3278..3278
    comics.py on lines 3311..3311

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["title"] == i["alt"] == title for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2153..2153
    comics.py on lines 2296..2296
    comics.py on lines 2858..2858
    comics.py on lines 2884..2884
    comics.py on lines 3248..3248
    comics.py on lines 3278..3278
    comics.py on lines 3311..3311

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["title"] == i["alt"] == alt for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2153..2153
    comics.py on lines 2251..2251
    comics.py on lines 2858..2858
    comics.py on lines 2884..2884
    comics.py on lines 3248..3248
    comics.py on lines 3278..3278
    comics.py on lines 3311..3311

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] == alt for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2153..2153
    comics.py on lines 2251..2251
    comics.py on lines 2296..2296
    comics.py on lines 2858..2858
    comics.py on lines 2884..2884
    comics.py on lines 3278..3278
    comics.py on lines 3311..3311

    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 35.

    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

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

            tags = " ".join(
                t["content"] for t in soup.find_all("meta", property="article:tag")
    Severity: Minor
    Found in comics.py and 1 other location - About 45 mins to fix
    comics.py on lines 2439..2440

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] == title for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2153..2153
    comics.py on lines 2251..2251
    comics.py on lines 2296..2296
    comics.py on lines 2858..2858
    comics.py on lines 3248..3248
    comics.py on lines 3278..3278
    comics.py on lines 3311..3311

    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 35.

    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 9 locations. Consider refactoring.
    Open

            assert all(i["title"] == i["alt"] == title for i in imgs)
    Severity: Major
    Found in comics.py and 8 other locations - About 45 mins to fix
    comics.py on lines 1165..1165
    comics.py on lines 2251..2251
    comics.py on lines 2296..2296
    comics.py on lines 2858..2858
    comics.py on lines 2884..2884
    comics.py on lines 3248..3248
    comics.py on lines 3278..3278
    comics.py on lines 3311..3311

    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 35.

    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

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

            tags = " ".join(
                t["content"] for t in soup.find_all("meta", property="article:tag")
    Severity: Minor
    Found in comics.py and 1 other location - About 45 mins to fix
    comics.py on lines 3313..3314

    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 35.

    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 3 locations. Consider refactoring.
    Open

                if comic is not None:
                    assert "url" not in comic
                    comic["url"] = url
                    yield comic
    Severity: Major
    Found in comics.py and 2 other locations - About 45 mins to fix
    comics.py on lines 51..54
    comics.py on lines 323..326

    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 35.

    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 3 locations. Consider refactoring.
    Open

                if comic is not None:
                    assert "num" not in comic
                    comic["num"] = num
                    yield comic
    Severity: Major
    Found in comics.py and 2 other locations - About 45 mins to fix
    comics.py on lines 199..202
    comics.py on lines 323..326

    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 35.

    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

            return comics_page.find("a", class_=class_) or comics_page.find(
                "a", class_=class_ + " "
    Severity: Minor
    Found in comics.py and 1 other location - About 40 mins to fix
    comics.py on lines 5891..5892

    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 34.

    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 3 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return cls.get_nav(last_soup)[2 if next_ else 1]
    Severity: Major
    Found in comics.py and 2 other locations - About 40 mins to fix
    comics.py on lines 3802..3805
    comics.py on lines 7042..7045

    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 34.

    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 3 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return cls.get_nav(last_soup)[3 if next_ else 1]
    Severity: Major
    Found in comics.py and 2 other locations - About 40 mins to fix
    comics.py on lines 2017..2020
    comics.py on lines 7042..7045

    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 34.

    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 3 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return cls.get_nav(last_soup)[3 if next_ else 0]
    Severity: Major
    Found in comics.py and 2 other locations - About 40 mins to fix
    comics.py on lines 2017..2020
    comics.py on lines 3802..3805

    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 34.

    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

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

            return {
                "img": [i["src"] for i in imgs],
                "title": title,
                "alt": alt,
                "author": author,
    Severity: Major
    Found in comics.py and 3 other locations - About 40 mins to fix
    comics.py on lines 2913..2918
    comics.py on lines 3001..3006
    comics.py on lines 3058..3063

    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 34.

    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

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

            return {
                "img": [i["src"] for i in imgs],
                "title": title,
                "alt": alt,
                "author": author,
    Severity: Major
    Found in comics.py and 3 other locations - About 40 mins to fix
    comics.py on lines 2859..2864
    comics.py on lines 2913..2918
    comics.py on lines 3001..3006

    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 34.

    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

            return {
                "date": string_to_date(date_str, "%B %d, %Y"),
                "img": [i["src"] for i in imgs],
                "title": title,
                "alt": alt,
    Severity: Minor
    Found in comics.py and 1 other location - About 40 mins to fix
    comics.py on lines 1262..1267

    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 34.

    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

            return {
                "title": title,
                "alt": alt,
                "author": author,
                "img": [i["src"] for i in imgs],
    Severity: Minor
    Found in comics.py and 1 other location - About 40 mins to fix
    comics.py on lines 3222..3227

    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 34.

    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

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

            return {
                "img": [i["src"] for i in imgs],
                "title": title,
                "alt": alt,
                "author": author,
    Severity: Major
    Found in comics.py and 3 other locations - About 40 mins to fix
    comics.py on lines 2859..2864
    comics.py on lines 3001..3006
    comics.py on lines 3058..3063

    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 34.

    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

    Identical blocks of code found in 4 locations. Consider refactoring.
    Open

            return {
                "img": [i["src"] for i in imgs],
                "title": title,
                "alt": alt,
                "author": author,
    Severity: Major
    Found in comics.py and 3 other locations - About 40 mins to fix
    comics.py on lines 2859..2864
    comics.py on lines 2913..2918
    comics.py on lines 3058..3063

    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 34.

    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

            return {
                "title": title,
                "description": desc,
                "url2": short_url,
                "img": [i["src"] for i in imgs],
    Severity: Minor
    Found in comics.py and 1 other location - About 40 mins to fix
    comics.py on lines 3250..3255

    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 34.

    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

            return {
                "date": string_to_date(date_str, "%B %d, %Y"),
                "img": [i["src"] for i in imgs],
                "title": title,
                "title2": title2,
    Severity: Minor
    Found in comics.py and 1 other location - About 40 mins to fix
    comics.py on lines 2297..2302

    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 34.

    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

            return last_soup.find("a", class_=class_) or last_soup.find(
                "a", class_=class_ + " "
    Severity: Minor
    Found in comics.py and 1 other location - About 40 mins to fix
    comics.py on lines 5879..5880

    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 34.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["title"] == i["alt"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2910..2910
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2910..2910
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 14 locations. Consider refactoring.
    Open

            assert all(i["alt"] == i["title"] for i in imgs)
    Severity: Major
    Found in comics.py and 13 other locations - About 35 mins to fix
    comics.py on lines 917..917
    comics.py on lines 1237..1237
    comics.py on lines 1260..1260
    comics.py on lines 1483..1483
    comics.py on lines 2052..2052
    comics.py on lines 2123..2123
    comics.py on lines 2480..2480
    comics.py on lines 2828..2828
    comics.py on lines 2998..2998
    comics.py on lines 3056..3056
    comics.py on lines 3097..3097
    comics.py on lines 3167..3167
    comics.py on lines 3558..3558

    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 33.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", id="next" if next_ else "prev")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 4 locations. Consider refactoring.
    Open

            return {
                "date": string_to_date(date_str, "%d %b %Y"),
                "img": [i["content"] for i in imgs],
                "title": title,
                "description": desc,
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 2124..2128
    comics.py on lines 2154..2158
    comics.py on lines 5907..5911

    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 32.

    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 3 locations. Consider refactoring.
    Open

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return cls.get_nav(get_soup_at_url(cls.url))[0]
    Severity: Minor
    Found in comics.py and 2 other locations - About 30 mins to fix
    comics.py on lines 3797..3800
    comics.py on lines 7037..7040

    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 32.

    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 18 locations. Consider refactoring.
    Open

    @classmethod
    def get_a_rel_next(cls, last_soup, next_):
        """Implementation of get_navi_link."""
        return last_soup.find("a", rel="next" if next_ else "prev")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

    @classmethod
    def get_a_comicnavbase_comicnavnext(cls, last_soup, next_):
        """Implementation of get_navi_link."""
        return last_soup.find(
            "a",
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", class_="single-navigation previous-post" if next_ else "single-navigation next-post")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050

    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 32.

    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 4 locations. Consider refactoring.
    Open

            return {
                "date": string_to_date(date_str, "%B %d, %Y"),
                "img": [i["src"] for i in imgs],
                "title": title,
                "alt": alt,
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 1919..1923
    comics.py on lines 2154..2158
    comics.py on lines 5907..5911

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", accesskey="n" if next_ else "p")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 4 locations. Consider refactoring.
    Open

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return (
                get_soup_at_url(cls.url)
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 989..992
    comics.py on lines 1182..1185
    comics.py on lines 3511..3514

    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 32.

    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 18 locations. Consider refactoring.
    Open

    @classmethod
    def get_a_navi_comicnavnext_navinext(cls, last_soup, next_):
        """Implementation of get_navi_link."""
        return last_soup.find(
            "a",
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 4 locations. Consider refactoring.
    Open

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return get_soup_at_url(cls.url).find("img", src="/firstlink.gif").parent
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 989..992
    comics.py on lines 3511..3514
    comics.py on lines 3747..3751

    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 32.

    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 4 locations. Consider refactoring.
    Open

            return {
                "date": string_to_date(date_str, "%B %d, %Y"),
                "img": [i["src"] for i in imgs],
                "title": title,
                "author": author,
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 1919..1923
    comics.py on lines 2124..2128
    comics.py on lines 5907..5911

    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 32.

    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

            return {
                "title": title,
                "author": author,
                "img": [img["src"] for img in imgs],
                "date": string_to_date(date_str, "%B %d, %Y"),
    Severity: Minor
    Found in comics.py and 1 other location - About 30 mins to fix
    comics.py on lines 2755..2759

    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 32.

    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

            return {
                "title": title,
                "author": author,
                "img": [i["src"] for i in imgs],
                "date": string_to_date(date_str, "%B %d, %Y"),
    Severity: Minor
    Found in comics.py and 1 other location - About 30 mins to fix
    comics.py on lines 1484..1488

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find(
                "a", class_="webcomic-link webcomic1-link next-webcomic-link next-webcomic1-link" if next_ else "webcomic-link webcomic1-link previous-webcomic-link previous-webcomic1-link"
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", class_="prev-item" if next_ else "next-item")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", class_="btn-next" if next_ else "btn-prev")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

    @classmethod
    def get_a_next(cls, last_soup, next_):
        """Implementation of get_navi_link."""
        return last_soup.find("a", title="Next" if next_ else "Previous")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 3 locations. Consider refactoring.
    Open

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return cls.get_nav(get_soup_at_url(cls.url))[1]
    Severity: Minor
    Found in comics.py and 2 other locations - About 30 mins to fix
    comics.py on lines 2012..2015
    comics.py on lines 3797..3800

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find(
                "a", class_="comic-arrow-right" if next_ else "comic-arrow-left"
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find(
                "a",
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 3 locations. Consider refactoring.
    Open

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return cls.get_nav(get_soup_at_url(cls.url))[0]
    Severity: Minor
    Found in comics.py and 2 other locations - About 30 mins to fix
    comics.py on lines 2012..2015
    comics.py on lines 7037..7040

    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 32.

    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 4 locations. Consider refactoring.
    Open

            return {
                "date": string_to_date(date_str, "%Y-%m-%d"),
                "img": [i["content"] for i in imgs],
                "author": author,
                "tags": tags,
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 1919..1923
    comics.py on lines 2124..2128
    comics.py on lines 2154..2158

    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 32.

    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 18 locations. Consider refactoring.
    Open

    @classmethod
    def get_a_navi_navinext(cls, last_soup, next_):
        """Implementation of get_navi_link."""
        # ComicPress (WordPress plugin)
        return last_soup.find("a", class_="navi navi-next" if next_ else "navi navi-prev")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", id="article-next" if next_ else "article-prev")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 4 locations. Consider refactoring.
    Open

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return get_soup_at_url(cls.url).find("div", class_="post-nav-oldest").parent
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 1182..1185
    comics.py on lines 3511..3514
    comics.py on lines 3747..3751

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", id="nextlink" if next_ else "previouslink")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", class_="next" if next_ else "prev")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 4 locations. Consider refactoring.
    Open

        @classmethod
        def get_first_comic_link(cls):
            """Get link to first comics."""
            return get_soup_at_url(cls.url).find("img", alt="First").parent
    Severity: Major
    Found in comics.py and 3 other locations - About 30 mins to fix
    comics.py on lines 989..992
    comics.py on lines 1182..1185
    comics.py on lines 3747..3751

    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 32.

    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 18 locations. Consider refactoring.
    Open

    @classmethod
    def get_link_rel_next(cls, last_soup, next_):
        """Implementation of get_navi_link."""
        return last_soup.find("link", rel="next" if next_ else "prev")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1812..1815
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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 18 locations. Consider refactoring.
    Open

        @classmethod
        def get_navi_link(cls, last_soup, next_):
            """Get link to next or previous comic."""
            return last_soup.find("a", title="next comic" if next_ else "go back already")
    Severity: Major
    Found in comics.py and 17 other locations - About 30 mins to fix
    comics.py on lines 409..412
    comics.py on lines 415..418
    comics.py on lines 421..424
    comics.py on lines 427..431
    comics.py on lines 434..439
    comics.py on lines 445..450
    comics.py on lines 1086..1090
    comics.py on lines 1778..1781
    comics.py on lines 1870..1873
    comics.py on lines 2201..2204
    comics.py on lines 3484..3488
    comics.py on lines 3685..3688
    comics.py on lines 3719..3722
    comics.py on lines 3956..3959
    comics.py on lines 3981..3986
    comics.py on lines 4047..4050
    comics.py on lines 7074..7077

    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 32.

    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

    There are no issues that match your filters.

    Category
    Status