-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omprakash #1876
base: master
Are you sure you want to change the base?
Omprakash #1876
Conversation
return average | ||
|
||
# Test the function | ||
numbers_list = [10, 20, 30, 40, 50] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 2 blank lines after class or function definition, found 1
average = total / len(numbers) | ||
return average | ||
|
||
# Test the function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
print("Error: Division by zero") | ||
|
||
# Example usage of the Calculator class | ||
calculator = Calculator() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 2 blank lines after class or function definition, found 1
@@ -0,0 +1,36 @@ | |||
# This is a sample Python code for testing Hound code review | |||
|
|||
class Calculator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
expected 2 blank lines, found 1
gem 'tzinfo-data' | ||
gem 'did_you_mean' | ||
gem 'hound' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 trailing blank lines detected.
@@ -57,3 +57,8 @@ group :test do | |||
gem "shoulda-matchers" | |||
gem "webmock" | |||
end | |||
gem 'tzinfo-data' | |||
gem 'did_you_mean' | |||
gem 'hound' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
@@ -57,3 +57,8 @@ group :test do | |||
gem "shoulda-matchers" | |||
gem "webmock" | |||
end | |||
gem 'tzinfo-data' | |||
gem 'did_you_mean' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem did_you_mean should appear before tzinfo-data.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@@ -57,3 +57,8 @@ group :test do | |||
gem "shoulda-matchers" | |||
gem "webmock" | |||
end | |||
gem 'tzinfo-data' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Trailing whitespace detected.
|
||
sys.meta_path.insert(0, PipImportRedirectingFinder()) | ||
|
||
assert __name__ == "__main__", "Cannot run __pip-runner__.py as a non-main module" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
|
||
if sys.version_info[:2] < PYTHON_REQUIRES: | ||
raise SystemExit( | ||
"This version of pip does not support python {} (requires >={}).".format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
req = Requirement(req_str) | ||
# We're explicitly evaluating with an empty extra value, since build | ||
# environments are not provided any mechanism to select specific extras. | ||
if req.marker is not None and not req.marker.evaluate({"extra": ""}): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
import textwrap | ||
from collections import OrderedDict | ||
from types import TracebackType | ||
from typing import TYPE_CHECKING, Iterable, List, Optional, Set, Tuple, Type, Union |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
if origin.url != download_info.url: | ||
logger.warning( | ||
"Origin URL %s in cache entry %s does not match download URL " | ||
"%s. This is likely a pip bug or a cache corruption issue. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
# https://github.com/pypa/pip/pull/10564 is merged. | ||
if origin.url != download_info.url: | ||
logger.warning( | ||
"Origin URL %s in cache entry %s does not match download URL " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (86 > 79 characters)
origin_path = Path(cache_dir) / ORIGIN_JSON_NAME | ||
if origin_path.exists(): | ||
try: | ||
origin = DirectUrl.from_json(origin_path.read_text(encoding="utf-8")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
return None | ||
|
||
@staticmethod | ||
def record_download_origin(cache_dir: str, download_info: DirectUrl) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
filename = os.path.normcase(filename) | ||
# list all files that start with ``filename`` | ||
file_list = ( | ||
x for x in os.listdir(current_path) if os.path.normcase(x).startswith(filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
for o in str(opt).split("/"): | ||
if cwords[cword - 2].split("=")[0] == o: | ||
if not opt.metavar or any( | ||
x in ("path", "file", "dir") for x in opt.metavar.split("/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
# get completion type given cwords and all available options | ||
completion_type = get_path_completion_type(cwords, cword, flattened_opts) | ||
if completion_type: | ||
subcommands = list(auto_complete_paths(current, completion_type)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
subcommands += opt._long_opts + opt._short_opts | ||
else: | ||
# get completion type given cwords and all available options | ||
completion_type = get_path_completion_type(cwords, cword, flattened_opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
] | ||
|
||
# filter out previously specified options from available options | ||
prev_opts = [x.split("=")[0] for x in cwords[1 : cword - 1]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
for opt in subcommand.parser.option_list_all: | ||
if opt.help != optparse.SUPPRESS_HELP: | ||
options += [ | ||
(opt_str, opt.nargs) for opt_str in opt._long_opts + opt._short_opts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
if subcommand_name == "help": | ||
sys.exit(1) | ||
# special case: list locally installed dists for show and uninstall | ||
should_list_installed = not current.startswith("-") and subcommand_name in [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
if options.require_venv and not self.ignore_require_venv: | ||
# If a venv is required check if it can really be found | ||
if not running_under_virtualenv(): | ||
logger.critical("Could not find an activated virtualenv (required).") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
# variable set. | ||
if options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ: | ||
logger.critical( | ||
"The --python option must be placed before the pip subcommand name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
usage: str = "" | ||
ignore_require_venv: bool = False | ||
|
||
def __init__(self, name: str, summary: str, isolated: bool = False) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging | ||
from pip._internal.utils.misc import get_prog, normalize_path | ||
from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry | ||
from pip._internal.utils.temp_dir import global_tempdir_manager, tempdir_registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
from pip._internal.utils.filesystem import check_path_owner | ||
from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging | ||
from pip._internal.utils.misc import get_prog, normalize_path | ||
from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
return parts | ||
|
||
def _get_candidates(self, link: Link, canonical_package_name: str) -> List[Any]: | ||
can_not_cache = not self.cache_dir or not canonical_package_name or not link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
|
||
return parts | ||
|
||
def _get_candidates(self, link: Link, canonical_package_name: str) -> List[Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
from pathlib import Path | ||
from typing import Any, Dict, List, Optional | ||
|
||
from pip._vendor.packaging.tags import Tag, interpreter_name, interpreter_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
choices=[ | ||
"legacy-resolver", | ||
], | ||
help=("Enable deprecated functionality, that will be removed in the future."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
|
||
def check_list_path_option(options: Values) -> None: | ||
if options.path and (options.user or options.local): | ||
raise CommandError("Cannot combine '--path' with '--user' or '--local'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
dest="root_user_action", | ||
default="warn", | ||
choices=["warn", "ignore"], | ||
help="Action if pip is run as a root user. By default, a warning message is shown.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
""" | ||
raise_option_error(parser, option=option, msg=msg) | ||
|
||
# If user doesn't wish to use pep517, we check if setuptools and wheel are installed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
|
||
|
||
# This was made a separate function for unit-testing purposes. | ||
def _convert_python_version(value: str) -> Tuple[Tuple[int, ...], Optional[str]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
) | ||
|
||
|
||
def _handle_src(option: Option, opt_str: str, value: str, parser: OptionParser) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
dest="proxy", | ||
type="str", | ||
default="", | ||
help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
dest="verbose", | ||
action="count", | ||
default=0, | ||
help="Give more output. Option is additive, and can be used up to 3 times.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
) | ||
|
||
if check_target: | ||
if not options.dry_run and dist_restriction_set and not options.target_dir: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
|
||
binary_only = FormatControl(set(), {":all:"}) | ||
sdist_dependencies_allowed = ( | ||
options.format_control != binary_only and not options.ignore_dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
return option_group | ||
|
||
|
||
def check_dist_restriction(options: Values, check_target: bool = False) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
parser.error(msg) | ||
|
||
|
||
def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser) -> OptionGroup: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
assert self.name | ||
super().__init__(*args, **kwargs) | ||
|
||
def check_default(self, option: optparse.Option, key: str, val: Any) -> Any: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
Ensure there is only one newline between usage and the first heading | ||
if there is no description. | ||
""" | ||
msg = "\nUsage: {}\n".format(self.indent_lines(textwrap.dedent(usage), " ")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
return self._format_option_strings(option) | ||
|
||
def _format_option_strings( | ||
self, option: optparse.Option, mvarfmt: str = " <{}>", optsep: str = ", " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
Returns a callable, that takes an iterable to "wrap". | ||
""" | ||
if bar_type == "on": | ||
return functools.partial(_rich_progress_bar, bar_type=bar_type, size=size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
lazy_wheel = False | ||
if "fast-deps" in options.features_enabled: | ||
logger.warning( | ||
"fast-deps has no effect when used with the legacy resolver." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
|
||
# Handle timeouts | ||
if options.timeout or timeout: | ||
session.timeout = timeout if timeout is not None else options.timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
|
||
def _create_truststore_ssl_context() -> Optional["SSLContext"]: | ||
if sys.version_info < (3, 10): | ||
raise CommandError("The truststore feature is only available for Python 3.10+") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
from pip._internal.utils.virtualenv import running_under_virtualenv | ||
|
||
if TYPE_CHECKING: | ||
from ssl import SSLContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ssl.SSLContext' imported but unused
general_options, args_else = parser.parse_args(args) | ||
|
||
# --python | ||
if general_options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
|
||
from pip._internal.build_env import get_runnable_pip | ||
from pip._internal.cli import cmdoptions | ||
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (86 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
|
||
# Display the array elements | ||
for i in range(len(my_array)): | ||
print(my_array[i], end=' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
# act as a keep-alive for systems like Travis-CI that take lack-of-output as | ||
# an indication that a task has frozen. | ||
class NonInteractiveSpinner(SpinnerInterface): | ||
def __init__(self, message: str, min_update_interval_seconds: float = 60.0) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
def _find_http_files(self, options: Values) -> List[str]: | ||
old_http_dir = self._cache_dir(options, "http") | ||
new_http_dir = self._cache_dir(options, "http-v2") | ||
return filesystem.find_files(old_http_dir, "*") + filesystem.find_files( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
filesystem.directory_size(http_cache_location) | ||
+ filesystem.directory_size(old_http_cache_location) | ||
) | ||
wheels_cache_size = filesystem.format_directory_size(wheels_cache_location) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
} | ||
|
||
if not options.cache_dir: | ||
logger.error("pip cache commands can not function since cache is disabled.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
e.filename = editor | ||
raise | ||
except subprocess.CalledProcessError as e: | ||
raise PipError(f"Editor Subprocess exited with exit code {e.returncode}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
shell_options = ["--" + shell for shell in sorted(shells)] | ||
if options.shell in shells: | ||
script = textwrap.dedent( | ||
COMPLETION_SCRIPTS.get(options.shell, "").format(prog=get_prog()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
def source_link(self) -> Optional[Link]: | ||
raise NotImplementedError("Override in subclass") | ||
|
||
def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
|
||
def is_satisfied_by(self, candidate: "Candidate") -> bool: | ||
# Reject if there are any mismatched URL constraints on this package. | ||
if self.links and not all(_match_link(link, candidate) for link in self.links): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
@classmethod | ||
def from_ireq(cls, ireq: InstallRequirement) -> "Constraint": | ||
links = frozenset([ireq.link]) if ireq.link else frozenset() | ||
return Constraint(ireq.specifier, ireq.hashes(trust_internet=False), links) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
CandidateVersion = Union[LegacyVersion, Version] | ||
|
||
|
||
def format_name(project: NormalizedName, extras: FrozenSet[NormalizedName]) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
algorithm = options.algorithm | ||
for path in args: | ||
write_output( | ||
"%s:\n--hash=%s:%s", path, algorithm, _hash_of_file(path, algorithm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
lines: List[str] = [] | ||
for hash_name, expecteds in self.allowed.items(): | ||
prefix = hash_then_or(hash_name) | ||
lines.extend((f" Expected {next(prefix)} {e}") for e in expecteds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
"someone may have tampered with them." | ||
) | ||
|
||
def __init__(self, allowed: Dict[str, List[str]], gots: Dict[str, "_Hash"]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
message="Encountered error while generating package metadata.", | ||
context=escape(package_details), | ||
hint_stmt="See above for details.", | ||
note_stmt="This is an issue with the package mentioned above, not pip.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
|
||
super().__init__( | ||
message=( | ||
f"[green]{escape(command_description)}[/] did not run successfully.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (86 > 79 characters)
from pip._vendor.rich.text import Text | ||
|
||
if TYPE_CHECKING: | ||
from hashlib import _Hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'hashlib._Hash' imported but unused
logger.info(str(tag)) | ||
|
||
if tags_limited: | ||
msg = f"...\n[First {tag_limit} tags shown. Pass --verbose to show all.]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
# Purge non version specifying lines. | ||
# Also, remove any space prefix or suffixes (including comments). | ||
lines = [ | ||
line.strip().split(" ", 1)[0] for line in f.readlines() if "==" in line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
latest = formatted_versions[0] | ||
|
||
write_output(f"{query} ({latest})") | ||
write_output("Available versions: {}".format(", ".join(formatted_versions))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
f"No matching distribution found for {query}" | ||
) | ||
|
||
formatted_versions = [str(ver) for ver in sorted(versions, reverse=True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
latest = formatted_versions[0] | ||
|
||
write_output(f"{query} ({latest})") | ||
write_output("Available versions: {}".format(", ".join(formatted_versions))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
f"No matching distribution found for {query}" | ||
) | ||
|
||
formatted_versions = [str(ver) for ver in sorted(versions, reverse=True)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
if not options.pre: | ||
# Remove prereleases | ||
versions = ( | ||
version for version in versions if not version.is_prerelease |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
) | ||
|
||
versions: Iterable[Union[LegacyVersion, Version]] = ( | ||
candidate.version for candidate in finder.find_all_candidates(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
target_python=target_python, | ||
) | ||
|
||
def get_available_package_versions(self, options: Values, args: List[Any]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
# Check for conflicts in the package set we're installing. | ||
conflicts: Optional[ConflictDetails] = None | ||
should_warn_about_conflicts = ( | ||
not options.ignore_dependencies and options.warn_about_conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
raise InstallationError( | ||
"Could not build wheels for {}, which is required to " | ||
"install pyproject.toml-based projects".format( | ||
", ".join(r.name for r in build_failures) # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
# If we're not replacing an already installed pip, | ||
# we're not modifying it. | ||
modifying_pip = pip_req.satisfied_by is None | ||
protect_pip_from_modification_on_windows(modifying_pip=modifying_pip) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
if would_install_items: | ||
write_output( | ||
"Would install %s", | ||
" ".join("-".join(item) for item in would_install_items), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
print_json(data=report.to_dict()) | ||
else: | ||
with open(options.json_report_file, "w", encoding="utf-8") as f: | ||
json.dump(report.to_dict(), f, indent=2, ensure_ascii=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
Traceback (most recent call last):
Traceback (most recent call last): File "/usr/local/bin/flake8", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main app.run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run self._run(argv) File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run self.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks self.file_checker_manager.run() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run self.run_serial() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial checker.run_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks self.run_ast_checks() File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks for (line_number, offset, text, check) in runner: File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run parser.visit(self.tree) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 379, in generic_visit self.visit(item) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef self.capture_issues_visitor('ClassDef', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 381, in generic_visit self.visit(value) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call self.capture_issues_visitor('Call', node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor issues = checker.run(node) File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run if isinstance(arg, ast.Call) and arg.func.id == 'locals': AttributeError: 'Attribute' object has no attribute 'id'
|
||
__slots__ = ["_compare_key", "_defining_class"] | ||
|
||
def __init__(self, key: Any, defining_class: Type["KeyBasedCompareMixin"]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
return super().get_requires_for_build_sdist(config_settings=cs) | ||
|
||
def get_requires_for_build_editable( | ||
self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
return super().get_requires_for_build_wheel(config_settings=cs) | ||
|
||
def get_requires_for_build_sdist( | ||
self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
) | ||
|
||
def get_requires_for_build_wheel( | ||
self, config_settings: Optional[Dict[str, Union[str, List[str]]]] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
) -> str: | ||
cs = self.config_holder.config_settings | ||
return super().build_editable( | ||
wheel_directory, config_settings=cs, metadata_directory=metadata_directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (86 > 79 characters)
return f"pip {__version__} from {pip_pkg_dir} (python {get_major_minor_version()})" | ||
|
||
|
||
def normalize_version_info(py_version_info: Tuple[int, ...]) -> Tuple[int, int, int]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
pip_pkg_dir = os.path.join(os.path.dirname(__file__), "..", "..") | ||
pip_pkg_dir = os.path.abspath(pip_pkg_dir) | ||
|
||
return f"pip {__version__} from {pip_pkg_dir} (python {get_major_minor_version()})" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (87 > 79 characters)
rmtree(self._path, onexc=onerror) | ||
if errors: | ||
logger.warning( | ||
"Failed to remove contents in a temporary directory '%s'.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
formatted_exc, | ||
) | ||
else: | ||
logger.debug("%s failed with %s.", func.__qualname__, formatted_exc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (84 > 79 characters)
|
||
@property | ||
def path(self) -> str: | ||
assert not self._deleted, f"Attempted to access deleted path: {self._path}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
No description provided.