language
string
code-snippit
string
instruction
string
flaws
list
flaw_count
int64
python
# Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 # DeepSpeed Team import importlib import inspect import functools from .abstract_accelerator import DeepSpeedAccelerator import torch # During setup stage torch may not be installed, pass on no torch will # allow op builder related API to be...
Review this code and list any quality issues.
[ { "issue": "Don't you need to add `mlu` references \r\n1. [here](https://github.com/microsoft/DeepSpeed/blob/9b7fc5452471392b0f58844219fcfdd14a9cdc77/accelerator/real_accelerator.py#L23) \r\n2. [here](https://github.com/microsoft/DeepSpeed/blob/9b7fc5452471392b0f58844219fcfdd14a9cdc77/accelerator/real_accelerat...
1
python
bins_missing = True if bins_missing: raise AssertionError("At least one release binary is missing. " "Previous releases binaries can be downloaded via `test/get_previous_releases.py -b`.") assert_equal(len(extra_confs), num_nodes) assert_equal(len(ext...
Review this code and list any quality issues.
[ { "issue": "coming from the conflicting pull, I don't think this call should exist in the first place for two reasons:\r\n\r\n* It doesn't work in most cases, because a failure to start any node likely means the RPC isn't up for the other nodes either, so the call will just fail in most cases. Effectively just ...
1
python
after.extend(range(end0 + 1, end1)) after.append(end0) end0 = end1 # Find an ordering of indices walking around the polygon indices = [] i = 0 for _ in range(len(verts) + len(ring_ends) - 1): # starting = False if i in loop_connections: j = loop_connections[i...
Review this code and list any quality issues.
[ { "issue": "The new `Vector3DLike` type alias from #4068 seems fit for this task.\r\n\r\nIn order to make this function more consistent by always returning a NumPy array (`Vector3D`), can you change the code inside the `if norm == 0:` branch so that it returns `np.zeros(3)` instead of `(0, 0, 0)`?\r\n```suggest...
1
python
if isinstance(stream_event_or_result, ChatCompletionResult): completion_result_data = stream_event_or_result else: yield stream_event_or_result # If violation detected, skip the rest of processing since we already sent refusal ...
Review this code and list any quality issues.
[ { "issue": "Can you add a test case to verify `top_p` is propagated to /v1/chat/completions, take the following two file as examples:\n- https://github.com/llamastack/llama-stack/pull/4775/changes#diff-1b55fd428e0f179b2a4613cf4a38e6669b7437f9d3f3c64b3f92adf9d4d8315a\n- https://github.com/llamastack/llama-stack/...
1
python
entries = self._generate_podcast_entries(channel['id'], collection_slug) else: entries = self._generate_playlist_entries(channel['id'], collection_slug) return self.playlist_result( entries=entries, playlist_id=collection_slug, playlist_title=channel.get(...
Review this code and list any quality issues.
[ { "issue": "the season is over\r\n```suggestion\r\n 'id': 'jetlag_14',\r\n 'title': 'Snake',\r\n 'description': 'md5:6da9040f1c2ac559579738bfb6919d1e',\r\n },\r\n 'playlist_count': 8,\r\n```", "severity": "minor", "line": 26 } ]
1
python
self.log.info("getblocktemplate: segwit rule must be set") assert_raises_rpc_error(-8, "getblocktemplate must be called with the segwit rule set", node.getblocktemplate, {}) self.log.info("getblocktemplate: Test valid block") assert_template(node, block, None) self.log.info("submitbloc...
Review this code and list any quality issues.
[ { "issue": "submit `no_tx_block` instead of `bad_block` here, and if I remember correctly from yesterday, that will lead to a different error.", "severity": "minor", "line": 26 } ]
1
python
"""Support for Wireless Sensor Tags.""" from __future__ import annotations from typing import TYPE_CHECKING from homeassistant.util.hass_dict import HassKey if TYPE_CHECKING: from . import WirelessTagPlatform DOMAIN = "wirelesstag" WIRELESSTAG_DATA: HassKey[WirelessTagPlatform] = HassKey(DOMAIN) # Template fo...
Review this code and list any quality issues.
[]
0
python
import codecs from typing import List, Iterator, Optional import idc import idaapi from PyQt5 import QtCore import capa.ida.helpers from capa.features.address import Address, FileOffsetAddress, AbsoluteVirtualAddress def info_to_name(display): """extract root value from display name e.g. function(my_functi...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n return f\"{hex(ea)}\"\r\n```", "severity": "minor", "line": 26 } ]
1
python
assert (x & y & z).has(x & z) def test_has_integrals(): f = Integral(x**2 + sin(x*y*z), (x, 0, x + y + z)) assert f.has(x + y) assert f.has(x + z) assert f.has(y + z) assert f.has(x*y) assert f.has(x*z) assert f.has(y*z) assert not f.has(2*x + y) assert not f.has(2*x*y) def te...
Review this code and list any quality issues.
[]
0
python
with open(logger, "w") as file: file.write(filedata) # copy delete(path.join(tdir, "webgpu")) shutil.copytree(path.join(clone_dir, "out-wpt"), path.join(tdir, "webgpu")) # update commit commit = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=clone_dir).deco...
Review this code and list any quality issues.
[ { "issue": "I think we should not hardcode` -M` here and should instead pass it as argument into smoketest invocation.", "severity": "minor", "line": 26 } ]
1
python
# OAuth 2.0 Device Authorization Grant flow, used by the YouTube TV client (youtube.com/tv). # # For more information regarding OAuth 2.0 and the Device Authorization Grant flow in general, see: # - https://developers.google.com/identity/protocols/oauth2/limited-input-device # - https://accounts.google....
Review this code and list any quality issues.
[ { "issue": "the comments are the same as the var names\r\n```suggestion\r\n _OAUTH_DEVICE_AUTHORIZATION_ENDPOINT = 'https://oauth2.googleapis.com/device/code'\r\n _OAUTH_TOKEN_ENDPOINT = 'https://oauth2.googleapis.com/token'\r\n```", "severity": "critical", "line": 26 } ]
1
python
prerun_receivers = signals.task_prerun.receivers postrun_receivers = signals.task_postrun.receivers success_receivers = signals.task_success.receivers from celery import canvas signature = canvas.maybe_signature # maybe_ does not clone if already def on_error( request: celery.app.task...
Review this code and list any quality issues.
[ { "issue": "Again, I think you need to use `Dict` here:\r\n\r\n```suggestion\r\n kwargs: Dict[str, Any],\r\n request: Optional[Dict[str, Any]] = None) -> trace_ok_t:\r\n```", "severity": "minor", "line": 26 } ]
1
python
Takes a tuple of function, data_struct, types, rank, disable_tqdm, desc as input, where data_struct is an element of `iterable`, and `rank` is used for progress bar. """ if ParallelBackendConfig.backend_name is None: return _map_with_multiprocessing_pool( function, iterable, num_...
Review this code and list any quality issues.
[ { "issue": "Maybe this can still be in map_nested, so that the signature of parallel_map could be \r\n```python\r\ndef parallel_map(function, iterable, num_proc):\r\n```\r\n\r\nand `map_nested` would call\r\n```python\r\nparallel_map(_single_map_nested, split_kwds, num_proc=num_proc)\r\n```\r\n\r\nThis way it w...
1
python
from .ops import Div return Div(self, other) def __rtruediv__(self, other): from .ops import Div return Div(other, self) def __pow__(self, other): from .ops import Power return Power(self, other) def __and__(self, other): from .ops import And re...
Review this code and list any quality issues.
[]
0
python
if TYPE_CHECKING: from typing_extensions import Self def pytest_addoption(parser: Parser) -> None: Config._add_verbosity_ini( parser, Config.VERBOSITY_SUBTESTS, help=( "Specify verbosity level for subtests. " "Higher levels will generate output for passed subtes...
Review this code and list any quality issues.
[ { "issue": "IMO we should strive to have the property that `from_json(to_json(report)) == report`. In this case it means that we should have `self.kwargs` itself should be serializable, not just in `to_json`.", "severity": "minor", "line": 26 } ]
1
python
# ref_per_token_logps = per_token_logps = get_logps_func(model, input_ids, attention_mask, logits_to_keep) # else: # ref_per_token_logps = None ref_hidden_states = inputs.get("ref_per_token_logps", None) # per_token_kl = torch.exp(ref_per_token_logps - per_token_logps) - (ref...
Review this code and list any quality issues.
[ { "issue": "Shouldn't we be setting `compute_efficient = compute_efficient` here", "severity": "major", "line": 26 } ]
1
python
| ____/ + <--- 'F' |_________|__|___|________ a b c <--- Switches We should treat 'a' as the roll date rather than 'c' because from the perspective of 'a', if a switch happens and we are pretty close to the auto-close date, we would probably...
Review this code and list any quality issues.
[ { "issue": "@yankees714 Just FYI, I made this change as you pointed out to be `>` instead of `>=` (and Jamie confirmed), and updated the tests accordingly (basically just moving rolls up by a day where necessary).", "severity": "minor", "line": 26 } ]
1
python
'url': 'https://www.aph.gov.au/News_and_Events/Watch_Read_Listen/ParlView/video/3406614', 'info_dict': { 'id': '3406614', 'ext': 'mp4', 'title': 'Senate Chamber', 'description': 'Official Recording of Senate Proceedings from the Australian Parliament', ...
Review this code and list any quality issues.
[ { "issue": "There is nothing useful we can do without this data, so this can just be fatal\r\n```suggestion\r\n```", "severity": "minor", "line": 26 } ]
1
python
enclosing_name = table_row.TypeName typedef_name.append(enclosing_name) return table_row.TypeNamespace, tuple(typedef_name[::-1]) else: return typedef.TypeNamespace, (typedef.TypeName,) def resolve_nested_typeref_helper(index: int, typeref: dnfile.mdtable.TypeDefRow, pe: dnfile.dnPE): ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n # Iterate through the TypeRef table to resolve the nested name\r\n```", "severity": "minor", "line": 26 } ]
1
python
}, { # youtube 'url': 'https://yandex.ru/video/preview/?filmId=16658118429797832897&from=tabbar&p=1&text=%D0%BF%D1%80%D0%BE%D1%81%D0%BC%D0%BE%D1%82%D1%80+%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82%D0%B0+%D0%BC%D0%B0%D0%BB%D0%B5%D0%BD%D1%8C%D0%BA%D0%B8%D0%B9+%D0%BF%D1%80%D0%B8%D0%BD%D1%86+%D0%BC%D1%8B+%D0...
Review this code and list any quality issues.
[ { "issue": "shouldn't we return the new `video_id` too?", "severity": "minor", "line": 26 } ]
1
python
Can now pass ``int`` to ``colour`` keyword-only parameter. .. versionadded:: 2.0 The ``display_icon`` keyword-only parameter was added. .. versionchanged:: 2.0 This function will now raise :exc:`TypeError` instead of ``InvalidArgument``. Parameters ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n The tertiary color for the role. Can only be used for the holographic role preset,\r\n which is ``(11127295, 16759788, 16761760)``\r\n```", "severity": "minor", "line": 26 } ]
1
python
vector: NDArray[Any], iaxis_pad_width: tuple[int, int], iaxis: int, kwargs: dict[str, Any], /, ) -> None: ... _ModeKind: TypeAlias = L[ "constant", "edge", "linear_ramp", "maximum", "mean", "median", "minimum", "reflect", "symmetric", "wrap", ...
Review this code and list any quality issues.
[ { "issue": "this type alias is not public API (and this one doesn't exist even), so needs a a leading underscore\r\n\r\n```suggestion\r\n_PadWidth: TypeAlias = (\r\n```\r\n\r\nAnd naming-wise; a `*Type` suffix is conventionally used to indicate that the type alias is a `type`, for example `IntType: TypeAlias = ...
1
python
normalized_path = "/" + normalized_path # Hard-exclude any files that matches the `--force-exclude` regex. if force_exclude: force_exclude_match = force_exclude.search(normalized_path) else: force_exclude_match = None if force_exclude_match...
Review this code and list any quality issues.
[ { "issue": "What if there are more than two levels? For example, we're formatting `a/b/c/` and `a/.gitignore/`, `a/b/.gitignore`, and `a/b/c/.gitignore` all exist.", "severity": "minor", "line": 26 } ]
1
python
def week_start(days_offset=0): return NthTradingDayOfWeek(n=days_offset) @staticmethod def week_end(days_offset=0): return NDaysBeforeLastTradingDayOfWeek(n=days_offset) class time_rules(object): market_open = AfterOpen market_close = BeforeClose every_minute = Always class Cale...
Review this code and list any quality issues.
[ { "issue": "FYI, we also have `zipline.utils.classproperty`.", "severity": "minor", "line": 26 } ]
1
python
.. versionadded:: 2.0 Attributes ------------ type: :class:`~discord.AppCommandOptionType` The type of argument. name: :class:`str` The name of the argument. description: :class:`str` The description of the argument. name_localizations: Dict[:class:`~discord.Locale`, :cl...
Review this code and list any quality issues.
[ { "issue": "I think `self.guild` can be `None` here? That is probably why the type checker was complaing", "severity": "minor", "line": 26 } ]
1
python
"{% if city_filter is defined %}\n" " AND city = '{{ city_filter }}'\n{% endif %}\n" "LIMIT {{ limit | default(100) }}" ), "schema": None, "template_params": {}, } example_db = get_example_database() if example_db.backend no...
Review this code and list any quality issues.
[ { "issue": "Agreed with @pizofreude here. This creates a tight coupling between the error message and the test. Let's check if we have any other way to determine jinja errors here", "severity": "major", "line": 26 } ]
1
python
>>> def _exists(self) -> bool: >>> return Path(self._filepath.as_posix()).exists() >>> >>> def _describe(self): >>> return dict(param1=self._param1, param2=self._param2) Example catalog.yml specification: :: my_dataset: type: <path-to...
Review this code and list any quality issues.
[ { "issue": "Isn't this shared across all instances? How to make sure we're not overwriting everything with the latest instance args?", "severity": "minor", "line": 26 } ]
1
python
inputs have already been checked and normalized by run(). This contains the Common pipeline execution logic using an executor. Args: pipeline: The ``Pipeline`` to run. catalog: An implemented instance of ``CatalogProtocol`` from which to fetch data. hook_manager: Th...
Review this code and list any quality issues.
[ { "issue": "Not sure if it's related to what @merelcht is saying, but for the record I was skimming this code and thought \"what if `pool is None`?\" (there's no `else` branch here). Just a comment from the peanut gallery.", "severity": "minor", "line": 26 } ]
1
python
Subclasses should override :attr:`!name` The scale's name. :meth:`get_transform` A method returning a `.Transform`, which converts data coordinates to scaled coordinates. This transform should be invertible, so that e.g. mouse positions can be converted back to data coordinates...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n object as the first argument.\r\n```", "severity": "minor", "line": 26 } ]
1
python
txId = self.nodes[1].sendrawtransaction(signedTx['hex']) self.nodes[1].generate(1) self.sync_all() # make sure funds are received at node1 assert_equal(oldBalance+Decimal('500001.10000000'), self.nodes[0].getbalance()) ############################################### # ...
Review this code and list any quality issues.
[ { "issue": "I'm not sure this was correct, before; it looks like it should be using the outputs from line 511, but wasn't. Probably one for me to check after this PR.", "severity": "minor", "line": 26 } ]
1
python
return extra_kwargs == set(), extra_kwargs def run_cmd(cmd_list: list[str], **kwargs: Any) -> subprocess.CompletedProcess: """ Run a command by using ``subprocess.run`` with capture_output=True and stderr=subprocess.STDOUT so that the raise exception will have that information. The argument `capture_outpu...
Review this code and list any quality issues.
[ { "issue": "Was there a specific reason to use this pattern rather than `outputs = str(e.stdout)`? If stdout and stderr aren't going to contain much text this would be fine but if they are large blocks of output we might want to use `textwrap.indent` to format things a little.", "severity": "minor", "l...
1
python
self, config: RetryConfig, wrapped: BaseTransport | None = None, validate_response: Callable[[Response], Any] | None = None, ): self.config = config self.wrapped = wrapped or HTTPTransport() self.validate_response = validate_response def handle_request(self, requ...
Review this code and list any quality issues.
[ { "issue": "This may not work right if the transport was already entered manually through entering the client... Should we instead add an on-error handler to exit and enter again?", "severity": "minor", "line": 26 } ]
1
python
'pprofile': 'ots_desktop_html', 'sensitive': 'false', 'w': '1920', 'h': '1080', 'rnd': '1660303', 'mode': 'LIVE', 'format': 'SMIL', 'tracking': 'true', 'formats': 'M3U+none,MPEG-DASH+none,MPEG...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n title = video_data.get('title') or traverse_obj(\r\n nbc_data, ('dataLayer', 'contenttitle'), ('dataLayer', 'title'),\r\n ('dataLayer', 'adobe', 'prop22'), ('dataLayer', 'id'))\r\n```", "severity": "minor", "line": 26 } ]
1
python
import json import uvicorn from fastapi import FastAPI, Request from fastapi.responses import JSONResponse, Response, StreamingResponse from transformers import AutoModelForCausalLM, AutoTokenizer import colossalai from colossalai.inference.config import InferenceConfig from colossalai.inference.server.chat_service i...
Review this code and list any quality issues.
[ { "issue": "Is it possible to add an engine check API to check if the engine is running properly?", "severity": "minor", "line": 26 } ]
1
python
assert dag is not None assert str(tmp_path) in dag.description # sys.path is enhanced during parse assert str(tmp_path) not in sys.path # bundle path is not preserved in sys.path assert sys.path == syspath_before # sys.path doesn't change def test_bundle_path_syspath_is_cleanup_on_failu...
Review this code and list any quality issues.
[ { "issue": "```suggestion\n ...\n```", "severity": "minor", "line": 26 } ]
1
python
point : Union[:class:`list`, :class:`numpy.ndarray`], optional The location of the dot. radius : :class:`float`, optional The radius of the dot. color : :class:`~.Colors`, optional The color of the :class:`Dot3D` Examples -------- .. manim:: Dot3DExample :save_last_...
Review this code and list any quality issues.
[ { "issue": "This will cause an error to be thrown if a user passes in a resolution parameter:\r\n```py\r\nTypeError: manim.mobject.three_dimensions.Sphere.__init__() got multiple values for keyword argument 'resolution'\r\n```\r\na safer approach would be to include it in `__init__` and doing `resolution=resolu...
1
python
If :file:`pdftex.map` specifies no encoding for a PostScript font, this number is an index to the font's "native" charmap; glyphs should directly load using FT_Load_Char/load_char after selecting the native charmap. """ # The last section is only true on luatex since luaotfload 3...
Review this code and list any quality issues.
[ { "issue": "Should we fall back to something like `f'pk{self.glyph:x}'` so that they are all unique? (the `pk` prefix is something _like_ the `uni` prefix on Unicode-encoded glyphs)", "severity": "minor", "line": 26 } ]
1
python
) converted_arrays = [] for array, is_sparse, is_none in zip(arrays, sparse_mask, none_mask): if is_none: converted_arrays.append(None) elif is_sparse: converted_arrays.append(array) else: xp_array, _, device_array = get_namespace_and_device(array) ...
Review this code and list any quality issues.
[ { "issue": "This line and L518 talk about `copy=` as a keyword argument. But I can't see it being used anywhere. So I'm confused. Is the comment out of date? Or is it on purpose that the comment mentions it but it isn't in the code?", "severity": "minor", "line": 26 } ]
1
python
app.add_config_value('plot_formats', ['png', 'hires.png', 'pdf'], True) app.add_config_value('plot_basedir', None, True) app.add_config_value('plot_html_show_formats', True, True) app.add_config_value('plot_rcparams', {}, True) app.add_config_value('plot_apply_rcparams', False, True) app.add_config_...
Review this code and list any quality issues.
[ { "issue": "The name is a bit generic. Maybe \r\n```suggestion\r\n env.mpl_plot_image_basenames = defaultdict(set)\r\n```\r\nOr similar. This naming is *library_directive_option*.", "severity": "minor", "line": 26 } ]
1
python
stroke_color: Color | None = None, stroke_opacity: float = 1.0, stroke_width: float = DEFAULT_STROKE_WIDTH, draw_stroke_behind_fill: bool = False, # Indicates that it will not be displayed, but # that it should count in parent mobject's path pre_function_handle_to_anchor_...
Review this code and list any quality issues.
[ { "issue": "Why did this need to be changed? Iirc `set_stroke` should be handling converting the float into a 2d-array to be placed into `self.data`", "severity": "minor", "line": 26 } ]
1
python
class InvalidRuleSet(ValueError): def __init__(self, msg): super().__init__() self.msg = msg def __str__(self): return f"invalid rule set: {self.msg}" def __repr__(self): return str(self) # COM data source https://github.com/stevemk14ebr/COM-Code-Helper/tree/master VALID_...
Review this code and list any quality issues.
[ { "issue": "we'll need to check that this works with pyinstaller binaries. do you happen to know @Aayush-Goel-04?", "severity": "minor", "line": 26 } ]
1
python
#! /usr/bin/env python3 """ Sherlock: Find Usernames Across Social Networks Module This module contains the main logic to search for usernames at social networks. """ import sys if __name__ == "__main__": """Check if the user is using the correct version of Python""" python_version = sys.version.split()[0]...
Review this code and list any quality issues.
[ { "issue": "You should probably use `#` for comment and not `\"\"\"`.", "severity": "minor", "line": 14 } ]
1
python
'thumbnail': r're:/upload/[^.]+.jpg', 'season': 6, 'episode_id': 220899 } }, { 'url': 'https://radiocomercial.pt/podcasts/convenca-me-num-minuto/t3/convenca-me-num-minuto-que-os-lobisomens-existem', 'md5': '47e96c273aef96a8eb160cd6cf46d782', 'info_dict...
Review this code and list any quality issues.
[ { "issue": "The returned id should reflect which season is being downloaded. Otherwise, different seasons would end up with the same id.", "severity": "minor", "line": 26 } ]
1
python
response=httpx.Response(405), ) ], ), ), ( ExceptionGroup( "Some exception group", [McpError(ErrorData(code=500, message="Session terminated"))], ) ), ], ) async def test_mcp_client_fallba...
Review this code and list any quality issues.
[ { "issue": "The docstring for `test_mcp_client_fallback_to_sse_success` says it falls back on a 405 (method not allowed), but the parametrization also includes an `McpError` case. Update the docstring to reflect the full set of errors being exercised so the test intent stays accurate.", "severity": "minor",...
1
python
): return True else: return False def check_backend_access_control_mode(): backend_access_control = os.environ.get("ENABLE_BACKEND_ACCESS_CONTROL", None) if backend_access_control is None: # If backend access control is not defined in environment variables, # enable it by d...
Review this code and list any quality issues.
[ { "issue": "DIUC that this `else` can be also removed. `return False` is enough, right? 🤔", "severity": "minor", "line": 26 } ]
1
python
s: Sequence[int] | None = None, axes: Sequence[int] | None = None, norm: _NormKind = None, out: NDArray[complex128] | None = None, ) -> NDArray[complex128]: ... def rfftn( a: ArrayLike, s: Sequence[int] | None = None, axes: Sequence[int] | None = None, norm: _NormKind = None, out: NDArr...
Review this code and list any quality issues.
[ { "issue": "maybe we could comment the default value, like we've done earlier:\r\n\r\n```suggestion\r\n axes: Sequence[int] | None = ..., # = (-2, 1)\r\n```", "severity": "minor", "line": 26 } ]
1
python
page_title = title or self._html_search_regex(( r'<h2\s+[^>]*class="uiHeaderTitle"[^>]*>(?P<content>[^<]*)</h2>', r'(?s)<span class="fbPhotosPhotoCaption".*?id="fbPhotoPageCaption"><span class="hasCaption">(?P<content>.*?)</span>', self._meta_regex('og:title'), self._meta...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n view_count = parse_count(self._search_regex(\r\n (r'\\bviewCount\\s*:\\s*[\"\\']([\\d,.]+)', r'video_view_count[\"\\']\\s*:\\s*(\\d+)',), webpage, 'view count', default=None))\r\n```", "severity": "minor", "line": 26 } ]
1
python
import os import json from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog from openpilot.selfdrive.ui.lib.api_helpers import RequestRepeater class PrimeType(IntEnum): UNKNOWN = -2 UNPAIRED = -1 NONE = 0 MAGENTA = 1 LITE = 2 BLUE = 3 MAGENTA_NEW = 4 PURPLE = 5 cl...
Review this code and list any quality issues.
[ { "issue": "Potential issue: If `dongle_id` is `None` (not just an empty string), the f-string will produce `\"v1.1/devices/None\"` which is an invalid API endpoint. Consider adding validation or handling `None` explicitly before constructing the RequestRepeater.", "severity": "minor", "line": 26 } ]
1
python
@skip_if_quick def test_attentionunet(self): for dims in [2, 3]: shape = (3, 1) + (92,) * dims input = torch.rand(*shape) model = att.AttentionUnet( spatial_dims=dims, in_channels=1, out_channels=2, channels=(3, 4, 5), up_kernel_size=5, strides=(1, 2) ...
Review this code and list any quality issues.
[ { "issue": "I would suggest as a more useful test to store the number of expected parameters for model_a and model_b and compare against those values. With that minor change we'd be ready to go with this PR I think.", "severity": "minor", "line": 26 } ]
1
python
tm.assert_frame_equal(result, df, check_column_type=False) result = DataFrame(index=df.index) result.loc[df.index, "data"] = ser._values tm.assert_frame_equal(result, df, check_column_type=False) def test_loc_setitem_ea_not_full_column(self): # GH#39163 df = DataFrame({"A":...
Review this code and list any quality issues.
[ { "issue": "Just for the sake of the test, I assuming using for example two columns with three rows is sufficient? Just to make the test a bit smaller (and thus marginally easier to read / update later)", "severity": "minor", "line": 26 } ]
1
python
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Review this code and list any quality issues.
[ { "issue": "I don't think there is a hive dialect test. Maybe just make this the hive dialect one and call it a day?", "severity": "minor", "line": 18 } ]
1
python
with suppress(OSError): m.rfind(b'A') assert False, 'mmap.rfind() did not raise' """) rt, stdout, stderr = assert_python_ok("-c", code, TESTFN) self.assertEqual(stdout.strip(), b'') self.assertEqual(stderr.strip(), b'') def test_flush_paramete...
Review this code and list any quality issues.
[ { "issue": "```suggestion\n m.flush(PAGESIZE * 2, flags=mmap.MS_INVALIDATE)\n```", "severity": "minor", "line": 26 } ]
1
python
parse_qs, time_seconds, traverse_obj, ) class PIAULIZAPortalIE(InfoExtractor): IE_DESC = 'ulizaportal.jp - PIA LIVE STREAM' _VALID_URL = r'https?://ulizaportal\.jp/pages/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})' _TESTS = [{ 'url': 'https://ulizaportal.jp/pages/005f18...
Review this code and list any quality issues.
[ { "issue": "No m3u8 url can be extracted for this test. Did it expire? timestamp says it's good til the year 2099", "severity": "major", "line": 26 } ]
1
python
# TODO(xusheng): performance optimizations to improve test execution time # https://github.com/mandiant/capa/issues/1610 if name[0] in ["@", "_"]: match = re.match(r"^[@|_](.*?)(Stub)?(@\d+)?$", name) if match: return match.group(1) return name def read_c_string(bv: BinaryView...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n s = []\r\n while len(s) < max_len:\r\n try:\r\n c = bv.read(offset + count, 1)[0]\r\n except Exception:\r\n break\r\n\r\n if c == 0:\r\n break\r\n\r\n s.append(chr(c))\r\n\r\n return \"\".join(s)\r\n```\r\n\r\nus...
1
python
def get_available_admin_languages(): return getattr( settings, "WAGTAILADMIN_PERMITTED_LANGUAGES", WAGTAILADMIN_PROVIDED_LANGUAGES ) @functools.cache def get_available_admin_time_zones(): if not settings.USE_TZ: return [] return getattr( settings, "WAGTAIL_USER_TIME_ZONES", so...
Review this code and list any quality issues.
[ { "issue": "I wonder if `LogContext` should be applied here or kept in `require_admin_access`. The latter would be more appropriate (as it's not related to localization), but the changes wouldn't be a 1:1 cut-paste from the original code.", "severity": "minor", "line": 26 } ]
1
python
'uploader_id': 'ds25vaazhlu4ygcvffid', 'release_timestamp': 1672543201, 'uploader': 'Lighthouse Ministries International - Beltsville, Maryland', 'description': 'md5:ac23e3d01b0b0be592e8f7fe0ec3a340', 'title': 'New Year\'s Eve CROSSOVER Service at LHMI | December 31, 202...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n r'var\\s*BOXCAST_PRELOAD\\s*=', webpage, 'broadcast data', display_id,\r\n```", "severity": "minor", "line": 26 } ]
1
python
from .common import InfoExtractor from ..utils import ( get_element_by_class, int_or_none, remove_start, strip_or_none, unified_strdate, ) class ScreencastOMaticIE(InfoExtractor): _VALID_URL = r'https?://screencast-o-matic\.com/(?:(?:watch|player)/|embed\?.*?\bsc=)(?P<id>[0-9a-zA-Z]+)' _TE...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n 'https://screencast-o-matic.com/player/password', video_id, 'Logging in',\r\n```", "severity": "minor", "line": 26 } ]
1
python
return bold, lists, headers def remove_code(answer, pattern): blocks = pattern.findall(answer) for block in blocks: answer = answer.replace(block, "") return answer # def get_element_counts(df, column="conversation_a"): # pattern = re.compile("```([^`]*)```") # md = markdown.Markdown() ...
Review this code and list any quality issues.
[ { "issue": "should we remove the comments or is it useful?", "severity": "minor", "line": 26 } ]
1
python
import time import datetime from .common import InfoExtractor class SportDeutschlandIE(InfoExtractor): _VALID_URL = r'https?://sportdeutschland\.tv/(?P<id>(?:[^/]+/)?[^?#/&]+)' _TESTS = [{ 'url': 'https://sportdeutschland.tv/blauweissbuchholztanzsport/buchholzer-formationswochenende-2023-samstag-1-bu...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n 'description': 'md5:xxx',\r\n```", "severity": "minor", "line": 15 } ]
1
python
def _move_model_to_vllm(self, *args, **kwargs): return None function = inspect.getsource(_move_model_to_vllm) return function pass RL_FUNCTIONS["grpo_trainer"].append(grpo_trainer__move_model_to_vllm) # Edit _get_per_token_logps to handle mixed precision def grpo_trainer__get_per_token_logps(function_name, f...
Review this code and list any quality issues.
[ { "issue": "I don't think this is correct since we auto upcast inside the `torch.compile` function, so this uses 2x more memory", "severity": "major", "line": 26 } ]
1
python
fd = HlsFD(self.ydl, self.params) success = download_complete = False timer = [None] ping_lock = threading.Lock() current_time = [0] ping_url = info_dict['_bunnycdn_ping_data']['url'] headers = info_dict['_bunnycdn_ping_data']['headers'] secret = info_dict['_bun...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n headers=headers)\r\n```", "severity": "minor", "line": 26 } ]
1
python
'only_matching': True, }, { 'url': 'https://mobile.france.tv/france-5/c-dans-l-air/137347-emission-du-vendredi-12-mai-2017.html', 'only_matching': True, }, { 'url': 'https://www.france.tv/142749-rouge-sang.html', 'only_matching': True, }, { # france-3 live 'ur...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n IE_NAME = 'franceinfo'\r\n IE_DESC = 'franceinfo.fr (formerly francetvinfo.fr)'\r\n```", "severity": "minor", "line": 26 } ]
1
python
class APIData: """Get the latest data for all authorities.""" def __init__(self) -> None: """Initialize the AirData object.""" self.data = None # Update only once in scan interval. @Throttle(SCAN_INTERVAL) def update(self): """Get the latest data from TFL.""" respon...
Review this code and list any quality issues.
[ { "issue": "why are you introducing a new attribute here?", "severity": "minor", "line": 26 } ]
1
python
@retry(wait=wait_random_exponential(min=30, max=600), stop=stop_after_attempt(5)) async def call_chat(inputs, interpreter): """ Calls the openai API to generate completions for the given inputs. Args: inputs (str): The inputs to generate completions for. interpreter (DataInterpreter): The data inte...
Review this code and list any quality issues.
[ { "issue": "This function already has a corresponding function inside metagpt and should be removed.", "severity": "minor", "line": 26 } ]
1
python
assert len(b_tis_in_executor) == 2 # Global task should go to the default executor (scheduler_job.executor) global_tis_in_executor = [ ti for ti in executor_to_tis.get(scheduler_job.executor, []) if ti.dag_id == "dag_global" ] assert len(global_tis_in_executor) == 1 ...
Review this code and list any quality issues.
[ { "issue": "The comment suggests the condition matches tasks at indices 10, 20, 30, etc., but the condition `(i % 10) == 0` actually matches indices 0, 10, 20, 30, etc. The comment should be updated to \"# 0, 10, 20, 30, 40, ...\" to accurately reflect when the condition is true.\n```suggestion\n ...
1
python
"src/black/__init__.py", "src/blib2to3/pytree.py", "src/blib2to3/pygram.py", "src/blib2to3/pgen2/parse.py", "src/blib2to3/pgen2/grammar.py", "src/blib2to3/pgen2/token.py", "src/blib2to3/pgen2/driver.py", "src/blib2to3/pgen2/pgen.py", ] from mypyc.build im...
Review this code and list any quality issues.
[]
0
python
def __init__(self, feature_left, feature_right, N): super(Corr, self).__init__(feature_left, feature_right, N, "corr") def _load_internal(self, instrument, start_index, end_index, *args): res: pd.Series = super(Corr, self)._load_internal(instrument, start_index, end_index, *args) # NOTE: L...
Review this code and list any quality issues.
[ { "issue": "I'm not sure if I'm correct.\r\nPersonally, it confuses me a little when I see the word change.\r\nDo you think \"FixedInst\" will be a better name?", "severity": "minor", "line": 26 } ]
1
python
cmap = plt.get_cmap("RdYlBu_r") bin_edges = np.linspace(Z.min(), Z.max(), bins + 1) norm = mcolors.BoundaryNorm(bin_edges, cmap.N) # main plot fig, ax = plt.subplots(layout="constrained") im = ax.imshow(Z, cmap=cmap, origin="lower", extent=[-3, 3, -3, 3], norm=norm) # inset histogram cax = ax.inset_axes([1.18, 0.02, ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\ncax.spines[:].set_visible(False)\r\ncax.set_yticks(bin_edges)\r\ncax.tick_params(axis=\"both\", which=\"both\", length=0)\r\n```", "severity": "minor", "line": 26 } ]
1
python
next_item_in_kvs = state_data['urlQueue'][0] sitemap_loader = SitemapRequestLoader([str(sitemap_url)], http_client=http_client, persist_state_key=persist_key) item = await sitemap_loader.fetch_next_request() assert item is not None assert item.url == next_item_in_kvs async def test_transform_reques...
Review this code and list any quality issues.
[ { "issue": "Can we add an assertion about the correct number of requests extracted from the BASIC_SITEMAP?\r\n\r\nif sitemap_loader.is_finished() returns True and no request was extracted, then this test still passes", "severity": "major", "line": 26 } ]
1
python
) return True async def async_migrate_entry(hass: HomeAssistant, entry: SwitchbotConfigEntry) -> bool: """Migrate SwitchBot config entries to the latest format.""" version = entry.version minor_version = entry.minor_version _LOGGER.debug("Migrating from version %s.%s", version, minor_version) ...
Review this code and list any quality issues.
[ { "issue": "Please add a test for the config entry migration.", "severity": "minor", "line": 26 } ]
1
python
temperature: NotGivenOr[float] = NOT_GIVEN, parallel_tool_calls: NotGivenOr[bool] = NOT_GIVEN, tool_choice: NotGivenOr[ToolChoice] = NOT_GIVEN, max_completion_tokens: NotGivenOr[int] = NOT_GIVEN, base_url: NotGivenOr[str] = NOT_GIVEN, api_key: NotGivenOr[str] = NOT_GIVEN, ...
Review this code and list any quality issues.
[ { "issue": "@theomonnom did we intentionally remove timeout?", "severity": "minor", "line": 26 } ]
1
python
def m2m_convert(n): keys = n.getElementsByTagName("natural") if keys: # If there are 'natural' subelements, it must be a natural # key field_value = [getInnerText(k).strip() for k in keys] obj_pk = ( ...
Review this code and list any quality issues.
[ { "issue": "This is a good idea IMO, but, regardless of whether we need a specific exception subclass for this fix, I'd go with\r\n```suggestion\r\n except SuspiciousOperation:\r\n```", "severity": "minor", "line": 26 } ]
1
python
if use_lazy_init: ctx.materialize(org_model) org_model = org_model.cuda() org_optimizer = Adam(org_model.parameters(), lr=1e-3) sharded_optimizer = Adam(sharded_model.parameters(), lr=1e-3) criterion = loss_fn plugin = HybridParallelPlugin(**test_config) booster = Booster(plugin=plugin...
Review this code and list any quality issues.
[]
0
python
await self.send(RoborockCommand.FIND_ME) async def async_set_fan_speed(self, fan_speed: str, **kwargs: Any) -> None: """Set vacuum fan speed.""" await self.send( RoborockCommand.SET_CUSTOM_MODE, [self._device_status.get_fan_speed_code(fan_speed)], ) async def as...
Review this code and list any quality issues.
[ { "issue": "We're using `_` in other integrations as a separator, could it be used here as well or can it occur in either map or segment component?", "severity": "minor", "line": 26 } ]
1
python
}).encode(), headers={ 'Content-Type': 'application/json', 'Oidcxsrf': self._get_cookies('https://login.vrt.be').get('OIDCXSRF').value, }, note='Logging in', errnote='Login failed', expected_status=403) if login_data.get('errorCode'): raise ExtractorError(...
Review this code and list any quality issues.
[ { "issue": "While this does work, the site uses the access token, not the refresh token. Is there any reason to not just always use the public api? i.e. do any videos exist for which metadata can not be fetched without an account?", "severity": "minor", "line": 26 } ]
1
python
def is_kernel_available(self, mask, b, np, sq, sk): attn_batches = b * np if (self.scaled_masked_softmax_fusion # user want to fuse and self.input_in_float16 # input must be fp16 and mask is not None # mask tensor must not be None and 16 < sk <= ...
Review this code and list any quality issues.
[ { "issue": "Similarly, check if causal by `attn_mask_type.value > 1`", "severity": "minor", "line": 26 } ]
1
python
latent_image_ids[..., 1] = latent_image_ids[..., 1] + torch.arange(height)[:, None] latent_image_ids[..., 2] = latent_image_ids[..., 2] + torch.arange(width)[None, :] latent_image_id_height, latent_image_id_width, latent_image_id_channels = latent_image_ids.shape latent_image_ids = latent_imag...
Review this code and list any quality issues.
[]
0
python
class LinkedInLearningIE(LinkedInLearningBaseIE): IE_NAME = 'linkedin:learning' _VALID_URL = r'https?://(?:www\.)?linkedin\.com/learning/(?P<course_slug>[^/]+)/(?P<id>[^/?#]+)' _TEST = { 'url': 'https://www.linkedin.com/learning/programming-foundations-fundamentals/welcome?autoplay=true', 'm...
Review this code and list any quality issues.
[ { "issue": "srt_data += '\\n%d\\n%s --> %s\\n%s\\n' % (line + 1, srt_subtitles_timecode(start_time),", "severity": "minor", "line": 26 } ]
1
python
# Make sure sigmas and timesteps have the same device and dtype as original_samples sigmas = self.sigmas.to(device=sample.device, dtype=sample.dtype) if sample.device.type == "mps" and torch.is_floating_point(timestep): # mps does not support float64 schedule_timesteps = self.ti...
Review this code and list any quality issues.
[ { "issue": "can we `noise` a required arg instead? \r\nto properly generate noise inside scale_noise we need to pass a generator too, I don't think we need to do that", "severity": "minor", "line": 26 } ]
1
python
setattr(wrapper, warned_flag, True) return obj(*args, **kwargs) setattr(wrapper, "__kedro_experimental__", True) setattr(wrapper, "__wrapped__", obj) _inject_experimental_doc(wrapper) return wrapper # Class if isinstance(obj, type): original_init = obj.__in...
Review this code and list any quality issues.
[ { "issue": "[Nit] Should we do -\nsetattr(new_init, \"_ _wrapped_ _\", original_init) ?", "severity": "minor", "line": 26 } ]
1
python
f"Invalid value for parameter `format`: {format}. Please choose from one of: {' '.join(valid_formats)}" ) self.format = format and format.lower() self.autoplay = autoplay self.loop = loop self.show_download_button = show_download_button self.show_share_button = ( ...
Review this code and list any quality issues.
[ { "issue": "Nit:\r\n\r\n```suggestion\r\n self.subtitles = None\r\n if subtitles is not None:\r\n self.subtitles = handle_file(subtitles)\r\n```", "severity": "minor", "line": 26 } ]
1
python
data=json.dumps({ 'email': username, 'password': password, 'cart_items': [], }).encode()) except ExtractorError as e: if isinstance(e.cause, HTTPError) and e.cause.status == 401: raise ExtractorError('Invalid...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n if selected_lecture and str(lecture.get('id')) != selected_lecture:\r\n```", "severity": "minor", "line": 26 } ]
1
python
) -> list[AppConversation | None]: info = await self.app_conversation_info_service.batch_get_app_conversation_info( conversation_ids ) conversations = await self._build_app_conversations(info) return conversations async def start_app_conversation( self, request: ...
Review this code and list any quality issues.
[ { "issue": "Ah, I see why… 🤔\r\n\r\nThe thing is, in `_validate_and…` method, the `validate` section is authorization, is security related. So it feels to me that like maybe that validatio code could be up in the stack a bit, where the rest of the auth/authz parameters are validated. \r\nCc: @tofarr I could b...
1
python
def __init__(self, *args, **kwargs): class FakeResponse: body = b'' headers = {} status_code = 101 reason_phrase = 'test' self.response = FakeResponse() def send(self, *args, **kwargs): raise raised() ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n # https://websockets.readthedocs.io/en/stable/reference/exceptions.html\r\n # ruff: disable[PLW0108] `websockets` may not be available\r\n```", "severity": "minor", "line": 26 } ]
1
python
# Copyright (c) 2019 Ansible by Red Hat # All Rights Reserved. from django.core.management.base import BaseCommand from awx.main.models import CredentialType class Command(BaseCommand): help = 'Load default managed credential types.' def handle(self, *args, **options): CredentialType.setup_tower_ma...
Review this code and list any quality issues.
[ { "issue": "If someone is explicitly running this management command then they probably want to make sure the code runs to register the CredentialType. Maybe they are debugging an error and want to trigger the code path.", "severity": "critical", "line": 14 } ]
1
python
"""Mobjects used to mark and annotate other mobjects.""" __all__ = ["SurroundingRectangle", "BackgroundRectangle", "Cross", "Underline"] from ..constants import * from ..mobject.geometry import Line, Rectangle from ..mobject.types.vectorized_mobject import VGroup, VMobject from ..utils.color import BLACK, RED, YELLO...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n quote = Text(\"If I have seen further than others, \\\\nit is by standing upon the shoulders of giants.\", color=BLUE).scale(0.75)\r\n```", "severity": "minor", "line": 24 } ]
1
python
'timestamp': 1749547434, 'upload_date': '20250610', 'release_timestamp': 1749646802, 'release_date': '20250611', 'modified_timestamp': 1749647146, 'modified_date': '20250611', 'live_status': 'not_live', }, }] def _real_extract(self...
Review this code and list any quality issues.
[ { "issue": "more precise extraction of metadata\r\n\r\nrelying on `<h3>` tag for the title is fatal in certain edge cases, it overwrites STREAKS title with `None`\r\n(e.g. https://cu.tbs.co.jp/program/13952)\r\n\r\n```diff\r\n@@ -47,16 +47,27 @@ def _real_extract(self, url):\r\n return {\r\n- ...
1
python
# `prev_sampled_token_ids` is expected to have shape [num_reqs, 1]. assert sampled_token_ids.dim() == 2 and sampled_token_ids.shape[-1] == 1, ( "PP+async expects sampled_token_ids to have shape [num_reqs, 1]" ) src_global_rank = pp.ranks[pp.world_size - 1] torch.distributed.b...
Review this code and list any quality issues.
[ { "issue": "actually will also work without the `tolist`\r\n```suggestion\r\n discard_req_indices = np.nonzero(self.discard_request_mask.np[:num_reqs])[0]\r\n```", "severity": "minor", "line": 26 } ]
1
python
def task_creation_agent(objective: str, result: Dict, task_description: str, task_list: List[str]): prompt = f"You are an task creation AI that uses the result of an execution agent to create new tasks with the following objective: {objective}, The last completed task has the result: {result}. This result was based...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\ndef execution_agent(objective: str, task: str) -> str:\r\n```\r\nformatting", "severity": "minor", "line": 26 } ]
1
python
else: formats.append({ 'url': v_url, 'format_id': video_format, }) process_video_files(video_files) metadata = self._parse_json( vpl_data['data-metadata'], display_id) duration = (int_or_none(tr...
Review this code and list any quality issues.
[ { "issue": "could we simplify this with `get_element_by_class` (utils)?", "severity": "major", "line": 26 } ]
1
python
autouse: bool = False, ids: Sequence[object | None] | Callable[[Any], object | None] | None = None, name: str | None = None, ) -> FixtureFunctionMarker | FixtureFunctionDefinition: """Decorator to mark a fixture factory function. This decorator can be used, with or without parameters, to define a f...
Review this code and list any quality issues.
[ { "issue": "Let's invert this to have a smaller thing indented and the condition simpler.\n```suggestion\n if self._instance is None:\n return self._fixture_function\n\n return cast(\n Callable[..., Any], self._fixture_function.__get__(self._instance)\n )\n```", "s...
1
python
return user, password # If a cookie file exists in the given datadir, delete it. def delete_cookie_file(datadir, chain): if os.path.isfile(os.path.join(datadir, chain, ".cookie")): logger.debug("Deleting leftover cookie file") os.remove(os.path.join(datadir, chain, ".cookie")) def softfork_activ...
Review this code and list any quality issues.
[ { "issue": "IIUC util is for more low-level stuff, but don't have better ideas other than throwing it on test_framework.py. Maybe @maflcko or @theStack would have an opinion on where we should put this?", "severity": "minor", "line": 26 } ]
1
python
# Source for `safe` arguments: https://url.spec.whatwg.org/#percent-encoded-bytes. def to_high_limit_path(path): if sys.platform in ['win32', 'cygwin']: # Work around MAX_PATH limitation on Windows. The maximum allowed length for the individual path segments may still be quite limited. return '\\\...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n mgln\\.ai/e\r\n```", "severity": "minor", "line": 26 } ]
1
python
self, secant_slope_group, target_dx=None, target_x=None, run_time=3, added_anims=None, **anim_kwargs, ): """This method animates the change of the secant slope group from the old secant slope group, into a new secant slope group. Parameters ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n added_anims : Optional[Sequence[:class:`~.Animation`]]\r\n```", "severity": "minor", "line": 26 } ]
1
python
if not mobj: return None days, hours, mins, secs = map(int_or_none, mobj.groups()) duration = 0 if secs: duration += float(secs) if mins: duration += float(mins) * 60 if hours: duration += float(hours) * 60 * 60 if days: ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n self.to_screen(\r\n 'Downloading all running proceedings. To specify one proceeding, use direct link from the website')\r\n```", "severity": "minor", "line": 26 } ]
1
python
def check_request_method(self, request, *args, **kwargs): """ Checks the ``method`` attribute of the request against those supported by the page (as defined by :attr:`allowed_http_methods`) and responds accordingly. If supported, ``None`` is returned, and the request is processe...
Review this code and list any quality issues.
[ { "issue": "This kept causing issues, spent about 30mins trying to get this resolved.\r\n\r\nThis did not work (even though we have Intersphinx configured), any tips @laymonage \r\n```\r\n:attr:`python:http.HTTPMethod.OPTIONS`\r\n``` \r\n\r\nI also tried importing the `http` module `import http # noqa: F401` bu...
1
python
'thumbnail': r're:^https://uploads\.cdn\.triller\.co/.+\.jpg$', } }] def _extract_video_list(self, username, user_id, limit=6): query = { 'limit': limit, } for page in itertools.count(1): for retry in self.RetryManager(): try: ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n if not video_list.get('videos'):\r\n break\r\n yield from video_list['videos']\r\n```", "severity": "minor", "line": 26 } ]
1
python
lookup_id, keys, cum_chunk_lengths, search_range, pin ), self.storage_manager.loop, ) def cleanup_memory_objs(self, lookup_id: str) -> None: """ Cleanup memory objects allocated during prefetch for an aborted lookup. Called by the scheduler when it determine...
Review this code and list any quality issues.
[ { "issue": "This seems to be a blocking wait. Will this slow down the cache-engine significantly?", "severity": "major", "line": 26 } ]
1
python
def set_vocab(self): # deal with intern-s1 if self.origin_hf_arch == 'InternS1ForConditionalGeneration': self._set_vocab_interns1() return super().set_vocab() @ModelBase.register("RND1") class RND1Model(Qwen2MoeModel): model_arch = gguf.MODEL_ARCH.RND1 def set_...
Review this code and list any quality issues.
[ { "issue": "```suggestion\r\n\r\n\r\n@ModelBase.register(\"Qwen3VLForConditionalGeneration\", \"Qwen3VLMoeForConditionalGeneration\")\r\n```", "severity": "minor", "line": 26 } ]
1
python
self.vllm_config.weight_transfer_config, self.vllm_config.parallel_config, ) if self.vllm_config.weight_transfer_config is not None else None ) # Torch/CUDA profiler. Enabled and configured through profiler_config. self.profiler: Any | None = ...
Review this code and list any quality issues.
[ { "issue": "```suggestion\n self._pp_send_work: list[Handle] = []\n```", "severity": "minor", "line": 26 } ]
1