michadenheijer/pynytimes

View on GitHub
pynytimes/api.py

Summary

Maintainability
A
0 mins
Test Coverage

File api.py has 539 lines of code (exceeds 250 allowed). Consider refactoring.
Wontfix

"""Main function of the wrapper"""
# Import typings dependencies
from __future__ import annotations

# Import standard Python dependencies
Severity: Major
Found in pynytimes/api.py - About 1 day to fix

NYTAPI has 28 functions (exceeds 20 allowed). Consider refactoring.
Wontfix

class NYTAPI:
    """
    New York Times API Class loads data from the NYT API.
    """

Severity: Minor
Found in pynytimes/api.py - About 3 hrs to fix

Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
Wontfix

    def __init__(
Severity: Minor
Found in pynytimes/api.py - About 45 mins to fix

Line too long (82 > 79 characters)
Open

            user_agent (str, optional): Set your own user-agent. Defaults to None.
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

Line too long (87 > 79 characters)
Open

            session (Session, optional): Use your own Session object. Defaults to None.
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

Line too long (82 > 79 characters)
Open

            parse_dates (bool, optional): Optionally parse all dates into datetime
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

Line too long (87 > 79 characters)
Open

            source (Literal["all", "nyt", "inyt"], optional): Select sources to get all
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

Line too long (80 > 79 characters)
Open

            filter_option (Optional[dict[str, Any]], optional): Filter the tags.
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

Line too long (81 > 79 characters)
Open

        """This function loads the data for the wrapper for most API use cases"""
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

Line too long (87 > 79 characters)
Open

            isbn (Optional[Union[str, int]], optional): ISBN of book. Defaults to None.
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

Line too long (85 > 79 characters)
Open

            results (int, optional): Load at most this many articles. Defaults to 10.
Severity: Minor
Found in pynytimes/api.py by pep8

Limit all lines to a maximum of 79 characters.

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

Reports error E501.

There are no issues that match your filters.

Category
Status