language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | 'id': 'the-deposition-of-stanley-plotkin',
'ext': 'mp4',
'title': 'THE DEPOSITION OF STANLEY PLOTKIN',
'description': 'md5:6d0be4f1181daaa10430fd8b945a5e54',
'thumbnail': r're:https?://static\.arkengine\.com/video/.+\.jpg',
},
}]
def _real_extract(self, u... | Review this code and list any quality issues. | [
{
"issue": "sorry, an extra blank line slipped in\r\n```suggestion\r\n\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | @patch("pathlib.Path.is_file", MagicMock(return_value=False))
def test_st_Page_throws_error_if_path_is_invalid():
with pytest.raises(StreamlitAPIException) as e:
st.Page("nonexistent.py")
assert (
str(e.value)
== "Unable to create Page. The file `nonexistent.py` could not be found."
... | Review this code and list any quality issues. | [
{
"issue": "This only asserts that *some* `StreamlitAPIException` is raised. Since the change is specifically about treating slash-only paths as an empty-path error, consider asserting the exception message (e.g., using `match=`) so the test won’t pass if a different validation error is thrown.\n```suggestion\n... | 1 |
python | round_method = getattr(ser.dt, method)
result = round_method(freq)
tm.assert_series_equal(result, expected)
def test_round_ea_boolean(self):
ser = Series([True, False], dtype="boolean")
expected = ser.copy()
result = ser.round(2)
tm.assert_series_equal(result, expect... | Review this code and list any quality issues. | [
{
"issue": "For all added tests, can you add a reference to the issue as a comment on the first line.\n\n```\n# GH#63444\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | neighbors_sum = 1 - gkernel[1, 1, 1]
gkernel[1, 1, 1] = neighbors_sum
self.svls_kernel = gkernel / neighbors_sum
svls_kernel_3d = self.svls_kernel.view(1, 1, ksize, ksize, ksize)
svls_kernel_3d = svls_kernel_3d.repeat(channels, 1, 1, 1, 1)
padding = int(ksize... | Review this code and list any quality issues. | [
{
"issue": "And for this class, would it be better to move it under monai/networks/layers/simplelayers.py?",
"severity": "minor",
"line": 26
}
] | 1 |
python | only_rank_0 (bool): whether to only save data on rank 0
Returns:
Dict: a dict whose key is param name and value is param with correct payload
"""
# save parameters
chunk_to_save_data = dict()
temp_chunk = get_temp_total_chunk_on_cuda(chunk, self.mixed_precision)
... | Review this code and list any quality issues. | [
{
"issue": "`record_tensor` needs to be put into cpu",
"severity": "minor",
"line": 26
}
] | 1 |
python | for p in paths:
cleaned = p.cleaned(remove_nans=True)
assert len(cleaned) == 1
assert cleaned.codes[0] == Path.STOP
def test_interpolated_moveto():
# Initial path has two subpaths with two LINETOs each
vertices = np.array([[0, 0],
[0, 1],
... | Review this code and list any quality issues. | [
{
"issue": "Test a compound path with multiple closepolys by doubling this again similar to your above test to make sure the implementation handles multiple MOVETOs and CLOSEPOLYS together?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # The back end of get_label_ccp is CuPy
# which is unable to automatically release CUDA GPU memory held by PyTorch
del nda_masks
torch.cuda.empty_cache()
shape_list, ncomponents = get_label_ccp(mask_index)
label_dict[LabelStatsK... | Review this code and list any quality issues. | [] | 0 |
python | 'info_dict': {
'id': 'welcome-to-beacon',
'ext': 'mp4',
'upload_date': '20240509',
'description': 'md5:ea2bd32e71acf3f9fca6937412cc3563',
'thumbnail': 'https://imagedelivery.net/_18WuG-hYMyVquF6KgU_xQ/critrole-beacon-staging-backend/beacon_trailer_thumbnail_be... | Review this code and list any quality issues. | [
{
"issue": "Let's simplify\r\n```suggestion\r\n content_data = traverse_obj(state, (\r\n lambda k, v: k.startswith('Content:') and v['slug'] == video_id, any))\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | click.style(
"""Config key not specified. Are you looking for "dask config list"?"""
),
err=True,
)
exit(1)
else:
value = dask.config.interpret_value(value)
_, path = save_config({key: value})
click.echo(f"Updated [{key}] to [{value}], ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n dask.config.set(new_config, config=config)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .niconico import (
NiconicoIE,
NiconicoPlaylistIE,
NiconicoUserIE,
NiconicoSeriesIE,
NiconicoHistoryIE,
NicovideoSearchDateIE,
NicovideoSearchIE,
NicovideoSearchURLIE,
NicovideoTagURLIE,
)
from .ninecninemedia import (
NineCNineMediaIE,
CPTwentyFourIE,
)
from .ninegag im... | Review this code and list any quality issues. | [] | 0 |
python | cpu_offload_params: set[str] = Field(default_factory=set)
""" The set of parameter name segments to target for CPU offloading.
Unmatched parameters are not offloaded. If this set is empty, parameters
are offloaded non-selectively until the memory limit defined by
`cpu_offload_gb` is reached.
Example... | Review this code and list any quality issues. | [] | 0 |
python | key="auto_track_limit_left",
cmd_key="GetPtzTraceSection",
translation_key="auto_track_limit_left",
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
native_step=1,
native_min_value=-1,
native_max_value=2700,
supported=lambda ap... | Review this code and list any quality issues. | [] | 0 |
python | else:
return values
def _get_model_from_node(self, node, attr):
"""
Look up a model from a <object model=...> or a <field rel=... to=...>
node.
"""
model_identifier = node.getAttribute(attr)
if not model_identifier:
raise base.DeserializationE... | Review this code and list any quality issues. | [
{
"issue": "Could we perhaps add a message to this exception, since we are re-raising it in `_handle_m2m_field_node`? To aid debugging/understanding the error.",
"severity": "critical",
"line": 26
}
] | 1 |
python | def _pp_broadcast_prev_sampled_token_ids(
self, sampled_token_ids: torch.Tensor
) -> None:
"""Broadcast sampled token ids (GPU) from last PP stage"""
pp = get_pp_group()
assert pp.is_last_rank
assert torch.distributed.is_initialized()
# `prev_sampled_token_ids` is exp... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n torch.distributed.broadcast(recv, src=pp.last_rank, group=pp.device_group)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return {
'author': self._html_search_regex(
r'<meta name="parsely-author" content="([^<]+)"',
webpage,
'video author',
default=None),
'channel': self._html_search_regex(
r'<div class="ClipPlayer-clipPlayerIntroSectio... | Review this code and list any quality issues. | [
{
"issue": "I would simplify this like so and also extract some other values:\r\n```suggestion\r\n return {\r\n 'id': display_id,\r\n 'display_id': display_id,\r\n 'formats': self._extract_akamai_formats(player_data['playbackURL'], display_id),\r\n **self._sear... | 1 |
python | "url": file.url,
},
"citations": {"enabled": True},
}
# Case 2: Document is a local file path
elif file.filepath is not None:
import base64
from pathlib import Path
path = Path(file.filepath) if isinstance(file.filepath, str) else file.filepath
if... | Review this code and list any quality issues. | [
{
"issue": "The Anthropic SDK enforces `media_type: Literal[\"text/plain\"]` for `PlainTextSourceParam` — we cannot pass the original MIME type like \"text/csv\" here even though the content is CSV. The SDK will reject it.",
"severity": "minor",
"line": 26
}
] | 1 |
python | }]
def _real_extract(self, url):
display_id = self._match_id(url)
webpage = self._download_webpage(url, display_id)
initial_state = self._search_json(
r'window\.__INITIAL_STATE__\s*=', webpage, 'initial state', display_id, transform_source=js_to_json)
note_info = traver... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'duration': ('duration', {functools.partial(float_or_none, scale=1000)})\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | log.info(
"Not skipping peak, don't have. Maybe we are not the fastest timelord "
f"height: {new_peak.reward_chain_block.height} weight:"
f"{new_peak.reward_chain_block.weight} "
)
self.timelord.new_peak = new_peak
... | Review this code and list any quality issues. | [
{
"issue": "we would expect this unfinished block to be removed later, when `_handle_new_peak()` is called, right?",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.page.locator('py-repl[exec-id="2"]').wait_for()
assert py_repls.count() == 3
assert outputs.count() == 3
#
# check that the code and the outputs are in order
out_texts = [el.inner_text() for el in self.iter_locator(outputs)]
assert out_texts == ["hello", "world", ""]... | Review this code and list any quality issues. | [] | 0 |
python | '''
_GEO_COUNTRIES = ['DK']
_TESTS = [{
'url': 'https://www.dr.dk/drtv/saeson/frank-and-kastaniegaarden_9008', # Season 2008 of "Frank & Kastaniegaarden"
'info_dict': {
'id': '9008',
'display_id': 'frank-and-kastaniegaarden',
'title': 'Frank & Kastaniegaarden... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n display_id, season_id = self._match_valid_url(url).group('display_id', 'id')\r\n data = self._download_json(SERIES_API % f'/saeson/{display_id}_{season_id}', display_id)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | import pytest
import httpx
def test_event_hooks(server):
events = []
def on_request(request):
events.append({"event": "request", "headers": dict(request.headers)})
def on_response(response):
headers = dict(response.headers)
headers["date"] = "Mon, 24 Aug 2020 13:18:40 GMT"
... | Review this code and list any quality issues. | [
{
"issue": "It seems we're not testing for \"request hooks are called on redirect requests\", which makes me think the decision to put request hooks at the top of `._send_handling_auth()` was not entirely deliberate? :-)\r\n\r\nAny case, whichever we decide I guess we'd need to add explicit tests for what we ex... | 1 |
python | target_url = request.url if isinstance(request, Request) else request
if self._check_enqueue_strategy(
kwargs.get('strategy', 'all'), target_url=urlparse(target_url), origin_url=parsed_origin_url
) and self._check_url_patterns(target_url, kwargs.get('include'), kwargs.get('exclu... | Review this code and list any quality issues. | [
{
"issue": "[nitpick] Consider logging a debug-level message when skipping enqueue due to a missing hostname to aid in troubleshooting silent drops of URLs.\n```suggestion\n logging.debug(\n \"Skipping enqueue: Missing hostname in origin_url (%s) or target_url (%s).\",\n ... | 1 |
python | def _extract_video_native_subtitles(self, api_response, subtitles_format):
subtitles = {}
for subtitle in traverse_obj(api_response, ('sfl', 'fi')) or ():
subtitles.setdefault(subtitle['lang'].lower(), []).append({
'url': subtitle['url'],
'ext': subtitles_form... | Review this code and list any quality issues. | [
{
"issue": "I know you didn't modify _extract_video_native_subtitles but I think we can avoid passing 'subtitle_format' if we check its 'captionType'. \r\n\r\nI think it would simplify this, using only a list of api_responses \r\n\r\n```python\r\n def _extract_video_native_subtitles(self, api_response):\r\n ... | 1 |
python | def get_tokenizer(pretrained_model_name_or_path: str, trust_remote_code: bool = False) -> Any:
"""Get tokenizer: try Hugging Face first, fallback to tiktoken immediately on failure."""
try:
return AutoTokenizer.from_pretrained(pretrained_model_name_or_path, trust_remote_code=trust_remote_code)
excep... | Review this code and list any quality issues. | [
{
"issue": "Using print statements for error reporting may not be optimal in production. Consider using a logging framework to provide more flexible and configurable error reporting.",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Test IntelliClima Sensors."""
from collections.abc import AsyncGenerator
from unittest.mock import AsyncMock, patch
from pyintelliclima.const import FanMode, FanSpeed
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.select import (
ATTR_OPTION,
DOMAIN as SELECT_DO... | Review this code and list any quality issues. | [
{
"issue": "The module docstring says \"Test IntelliClima Sensors\" but this file tests the Select platform, not sensors. It should say \"Test IntelliClima Select\".\n```suggestion\n\"\"\"Test IntelliClima Select.\"\"\"\n```",
"severity": "minor",
"line": 1
}
] | 1 |
python | )
result = ser.str.replace(pattern, repl, regex=True)
expected = Series(expected_list).convert_dtypes(dtype_backend="pyarrow")
tm.assert_series_equal(result, expected)
def test_replace_callable_named_groups(any_string_dtype):
# test regex named groups
ser = Series(["Foo Bar Baz", np.nan], dtype=an... | Review this code and list any quality issues. | [] | 0 |
python | Environment Variables:
Required for LLM-based search types (GRAPH_COMPLETION, RAG_COMPLETION):
- LLM_API_KEY: API key for your LLM provider
Optional:
- LLM_PROVIDER, LLM_MODEL: Configure LLM for search responses
- VECTOR_DB_PROVIDER: Must match what was used during cognify
... | Review this code and list any quality issues. | [
{
"issue": "Also this shouldn't fail on other adapters where you dont have this.",
"severity": "critical",
"line": 26
}
] | 1 |
python | ],
)
@pytest.mark.parametrize(
'package_manager',
[
pytest.param('pip', marks=pytest.mark.pip),
pytest.param('uv', marks=pytest.mark.uv),
pytest.param('poetry', marks=pytest.mark.poetry),
],
)
async def test_static_crawler_actor_at_apify(
tmp_path: Path,
crawlee_wheel_path: P... | Review this code and list any quality issues. | [] | 0 |
python | src = "%time 1 + \\\n2"
with pytest.raises(NothingChanged):
format_cell(src, fast=True, mode=JUPYTER_MODE)
def test_multiline_no_magic() -> None:
src = "1 + \\\n2"
result = format_cell(src, fast=True, mode=JUPYTER_MODE)
expected = "1 + 2"
assert result == expected
def test_cell_magic_wit... | Review this code and list any quality issues. | [
{
"issue": "Very nice refactors all over 👍",
"severity": "major",
"line": 26
}
] | 1 |
python | from fastapi import APIRouter, Query
from openhands.app_server.config import depends_sandbox_spec_service
from openhands.app_server.sandbox.sandbox_spec_models import (
SandboxSpecInfo,
SandboxSpecInfoPage,
)
from openhands.app_server.sandbox.sandbox_spec_service import (
SandboxSpecService,
)
from openhan... | Review this code and list any quality issues. | [] | 0 |
python | data_sync_id=data_sync_id if self.is_authenticated else None,
player_url=player_url if require_js_player else None,
)
require_po_token = self._get_default_ytcfg(client).get('REQUIRE_PO_TOKEN')
if not po_token and require_po_token:
self.report_warning(... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n po_token=po_token)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | ):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class QwenImageEditModularPipelineFastTests(
QwenImageModularTests, QwenImageModularGuiderTests, ModularPipelineTesterMixin, unittest.TestCase
):
pipeline_class = QwenImageEditModularPipeline
pipeline_blocks_class = Qwen... | Review this code and list any quality issues. | [
{
"issue": "These are skipped in the standard pipeline tests, too.",
"severity": "minor",
"line": 26
}
] | 1 |
python | See Also
========
prime : Return the nth prime
nextprime : Return the ith prime greater than n
prevprime : Return the largest prime smaller than n
randprime : Returns a random prime in a given range
primorial : Returns the product of primes based on condition
Sie... | Review this code and list any quality issues. | [
{
"issue": "It would be better to handle that `None` case in `primerange` so that the arguments to `_primerange` are simple.",
"severity": "minor",
"line": 26
}
] | 1 |
python | import re
from urllib.parse import urlparse
from .common import InfoExtractor
from ..utils import (
traverse_obj,
str_or_none,
)
class SubstackIE(InfoExtractor):
_VALID_URL = r'https?://(?P<username>[\w-]+)\.substack\.com/p/(?P<id>[\w-]+)'
_TESTS = [{
'url': 'https://haleynahman.substack.com/... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\nimport urllib.parse\r\n\r\nfrom .common import InfoExtractor\r\nfrom ..utils import (\r\n str_or_none,\r\n traverse_obj,\r\n)\r\n```",
"severity": "major",
"line": 8
}
] | 1 |
python | if self.save_top_k is None and self.monitor is not None:
self.save_top_k = 1
def _validate_monitor_key(self, trainer):
metrics = trainer.logger_connector.callback_metrics
# validate metric
if self.monitor is not None and not self._is_valid_monitor_key(metrics):
m = ... | Review this code and list any quality issues. | [
{
"issue": "does this work if the checkpoint name contains a quantity (e.g. val loss)? wouldn't `ckpt_name_metrics` contain different values each time?",
"severity": "minor",
"line": 26
}
] | 1 |
python | full_context['related_field_counts'] = {}
full_context['related_field_counts'][org_id] = org_counts
return full_context
class OrganizationInventoriesList(SubListAPIView):
model = Inventory
serializer_class = InventorySerializer
parent_model = Organization
relationship = 'inventories'
... | Review this code and list any quality issues. | [] | 0 |
python | result._name = res_name
return result
else:
if fill_value is not None:
if isna(other):
return op(self, fill_value)
self = self.fillna(fill_value)
return op(self, other)
def eq(
self,
other,
leve... | Review this code and list any quality issues. | [
{
"issue": "The parentheses added here do not help the issue since any Python object can be an element of a Series (even a Series itself can be an element of a Series!). We want to indicate that this method treats lists, tuples, ndarrays, and Series differently from any other Python object. Namely, these types ... | 1 |
python | f"---\n{output}\n---"
)
mode = "index" if all_targets[target].index else "check URL"
print(
f"\n=== 3. Publishing {project_name} {version} again with {mode} ===",
file=sys.stderr,
)
wait_for_index(index_url, project_name, version, uv, env)
# Test twine-style and index-st... | Review this code and list any quality issues. | [
{
"issue": "Flagging: the nuance here is that GitLab, unlike GitHub and other TP providers, doesn't have an \"active\" OIDC source: the runner gets a single OIDC credential at startup. As a result of that PyPI (and pyx) consider the OIDC credential \"spent\" after its first use, meaning that our duplicate/confl... | 1 |
python | from __future__ import annotations
import logging
from airos.exceptions import AirOSException
from homeassistant.components.button import (
ButtonDeviceClass,
ButtonEntity,
ButtonEntityDescription,
)
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from... | Review this code and list any quality issues. | [
{
"issue": "Omit the translation key and you can use the device class translation",
"severity": "minor",
"line": 26
}
] | 1 |
python | msg = "FakeInterface factory 'ayy-lmao' was not already registered"
with assert_raises_str(ValueError, msg):
rm.unregister('ayy-lmao')
def test_register_non_decorator(self):
rm = Registry(FakeInterface)
assert_equal(rm.get_registered_classes(), {})
class ProperDummyInte... | Review this code and list any quality issues. | [
{
"issue": "does this keep this line short enough to fit on one line?",
"severity": "minor",
"line": 26
}
] | 1 |
python | """
Computes mean absolute error.
Args:
compute_on_step:
Forward only calls ``update()`` and return None if this is set to False. default: True
ddp_sync_on_step:
Synchronize metric state across processes at each ``forward()``
before returning the value at the... | Review this code and list any quality issues. | [] | 0 |
python | async for event in event_stream:
events_collected.append(event)
# Extract run_id from the first event
if run_id is None and hasattr(event, "run_id"):
run_id = event.run_id
# Track content
if hasattr(event, "content") and event.content and isinstance(event.content, s... | Review this code and list any quality issues. | [] | 0 |
python | self.queue = queue.Queue() # report connections and exceptions to client
self.keep_alive = conf.keep_alive
def run(self):
while self.running:
(sockconn, _) = self.s.accept()
if self.running:
conn = Socks5Connection(self, sockconn)
thread = thr... | Review this code and list any quality issues. | [
{
"issue": "i don't think `sendall` can be guaranteed with non-blocking sockets, it will fail if it gets EAGAIN\r\nhttps://stackoverflow.com/questions/6240737/python-socket-sendall-function",
"severity": "critical",
"line": 26
}
] | 1 |
python | # reuse k, v, self_attention
key_states = torch.cat([past_key_value[0], key_states], dim=2)
value_states = torch.cat([past_key_value[1], value_states], dim=2)
past_key_value = (key_states, value_states) if use_cache else None
query_states = query_states.transpose(1, 2)
... | Review this code and list any quality issues. | [
{
"issue": "should first detect whether flash attention has been installed. if installed and use_kernel, use flash attention",
"severity": "minor",
"line": 26
}
] | 1 |
python | txt = self.capability.replace(" ", "-")
a = toAddr(hex(addr)) # type: ignore [name-defined] # noqa: F821
self.add_bookmark(a, txt)
# avoid re-naming functions
to_cont = False
for s in st.getSymbols(a):
if s.getSymbolType() == SymbolType.FUNC... | Review this code and list any quality issues. | [
{
"issue": "Please add comment explaining where label is expected to be created",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'timestamp': 1383239700,
'upload_date': '20131031',
'uploader': 'CBSI-NEW',
},
'params': {
# rtmp download
'skip_download': True,
},
'skip': '404 Not Found',
}, {
# from http://www.cnet.com/videos/tesla-model-s-a-second-step-tow... | Review this code and list any quality issues. | [
{
"issue": "this is fine\r\n```suggestion\r\n 'skip': '404 Not Found',\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | guardrail_ids = extract_guardrail_ids(guardrails) if guardrails else []
# Validate that Safety API is available if guardrails are requested
if guardrail_ids and self.safety_api is None:
raise ValueError(
"Cannot process guardrails: Safety API is not configured.\n\n"
... | Review this code and list any quality issues. | [
{
"issue": "this should be a `ge=16` on the `Field`",
"severity": "minor",
"line": 26
}
] | 1 |
python | @pytest.mark.xfail(reason="Logic failing")
def test_overlapping_patterns(self, tmp_path, mocker):
"""Check that same configuration file is not loaded more than once."""
_write_yaml(
tmp_path / _BASE_ENV / "catalog0.yml",
{"env": _BASE_ENV, "common": "common"},
)
... | Review this code and list any quality issues. | [
{
"issue": "Is the intention not changing the behavior but be able to called asserted_called_once? Can we use spy instead? wraping the original function with the same function looks weird to me.",
"severity": "minor",
"line": 26
}
] | 1 |
python | payload = json.dumps({'username': uploader, 'maxResults': 16, 'page': i + 1, 'requestName': 'userPage'}).encode('utf-8')
headers = {
'x-csrf-token': authtoken,
'content-type': 'application/json;charset=UTF-8'
}
for retry in self.RetryManager():
... | Review this code and list any quality issues. | [
{
"issue": "id and title should be non-fatal here; only url is required here.",
"severity": "minor",
"line": 26
}
] | 1 |
python | @property
def wallets_path(self) -> Path:
return self.chain_path / "wallets"
def debug_log_size(self, **kwargs) -> int:
with open(self.debug_log_path, **kwargs) as dl:
dl.seek(0, 2)
return dl.tell()
@contextlib.contextmanager
def assert_debug_log(self, expected_... | Review this code and list any quality issues. | [
{
"issue": "we don't actually need this here, can we move it closer to it actual usage? Or if we use a list/set comprehension we don't even need this line",
"severity": "minor",
"line": 26
}
] | 1 |
python | check=True,
stdout=subprocess.PIPE,
text=True,
)
dl_libs.append(x)
dl_libs.append(providers_openvino)
dl_libs.append("plugins.xml")
dl_libs.append("usb-ma2x8x.mvcmd")
data = ["capi/libonnxruntime_pywrapper.so"] if nightly_build else []
... | Review this code and list any quality issues. | [
{
"issue": "ONNX Runtime is released under MIT license, which cannot be changed. TRT's license should be put in https://github.com/microsoft/onnxruntime/blob/main/ThirdPartyNotices.txt .",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Test left handed rotation matrix
matrix = xp.eye(4)
matrix = xpx.at(matrix)[0, 0].set(-1)
if is_lazy_array(matrix):
matrix = RigidTransform.from_matrix(matrix).as_matrix()
assert xp.all(xp.isnan(matrix[..., :3, :3]))
else:
with pytest.raises(ValueError, match="Non-positive dete... | Review this code and list any quality issues. | [
{
"issue": "Should not be necessary since Rotation was already created from an xp array of correct dtype.",
"severity": "minor",
"line": 26
}
] | 1 |
python | )
@pytest.mark.usefixtures("init_integration")
async def test_set_value_while_session_active(
hass: HomeAssistant,
mock_saunum_client: MagicMock,
mock_config_entry: MockConfigEntry,
) -> None:
"""Test error when trying to change duration while session is active."""
entity_id = "number.saunum_leil_... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n with pytest.raises(ServiceValidationError, match=\"....\"):\r\n```\r\nWe can match on the exception",
"severity": "minor",
"line": 26
}
] | 1 |
python | series_id: Id of the series or programme the video episode belongs to, as a unicode string.
season: Title of the season the video episode belongs to.
season_number: Number of the season the video episode belongs to, as an integer.
season_id: Id of the season the video episode belongs to, ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n album_artist_list: List of all artists appeared on the album. E.g.\r\n [\"Ash Borer\", \"Fell Voices\"] or [\"Various Artists\"].\r\n Useful for splits and compilations.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | LlavaProcessorKwargs,
tokenizer_init_kwargs=self.tokenizer.init_kwargs,
**kwargs,
)
if images is not None:
image_inputs = self.image_processor(images, **output_kwargs["images_kwargs"])
else:
image_inputs = {}
if isinstance(text, str):
... | Review this code and list any quality issues. | [
{
"issue": "L163: we add `self.num_additional_image_tokens`\r\nL165: we subtract `1` \r\n\r\nMight that lead to a discrepancy?",
"severity": "minor",
"line": 26
}
] | 1 |
python | (
Request('http://127.0.0. 1', method='GET'),
'URL can\'t contain control characters',
lambda v: v < (3, 7, 8) or (3, 8, 0) <= v < (3, 8, 3),
),
# https://github.com/python/cpython/blob/987b712b4aeeece336eed24fcc87a950a756c3e2/Lib/http/client.py#L1288C31-L1288C50
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # ruff: disable[PLW0108] `requests` and/or `urllib3` may not be available\r\n (lambda: requests.exceptions.ConnectTimeout(), TransportError),\r\n (lambda: requests.exceptions.ReadTimeout(), TransportError),\r\n (lambda: requests.exceptions.Timeout(), Tra... | 1 |
python | )
def example_function(<NEW_PARAMETER_NAME>):
pass
# call function using deprecated parameter
example_function(<OLD_PARAMETER_NAME>=<OLD_PARAMETER_VALUE>)
```
"""
def decorator(func: Callable[..., Any]) -> Callable[..., Any]:
@functools.wraps(func)
d... | Review this code and list any quality issues. | [] | 0 |
python | self.add(dotL, dotR, dotMiddle)
"""
self.points = path_func(mobject1.points, mobject2.points, alpha)
self.interpolate_color(mobject1, mobject2, alpha)
return self
def interpolate_color(self, mobject1, mobject2, alpha):
raise NotImplementedError("Please override in a child cl... | Review this code and list any quality issues. | [
{
"issue": "Can you please add a Parameters section to the docstring where the new keyword arguments are documented?",
"severity": "minor",
"line": 26
}
] | 1 |
python | continue
for feature, _ in extractor.extract_function_features(f):
if capa.features.common.is_global_feature(feature):
continue
feature_map[feature] = feature_map.get(feature, 0) + 1
for bb in extractor.get_basic_blocks(f):
for feature, _ in extracto... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n parser = argparse.ArgumentParser(description=\"Show the features that capa doesn't have rules for yet\")\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | pandas.testing.assert_frame_equal(duckdb_col, converted_col)
@pytest.mark.parametrize('pandas', [NumpyPandas(), ArrowPandas()])
def test_list_correct(self, pandas, duckdb_cursor):
x = pandas.DataFrame([{'0': [[5], [34], [-245]]}])
duckdb_col = duckdb_cursor.sql("select [[5], [34], [-245]] as '0... | Review this code and list any quality issues. | [
{
"issue": "@Mytherin I added this test, it contains some behavior tests for incompatible struct schemas inside nested types\r\n\r\n(List, struct and map)",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Pipeline data will be a dataframe with boolean columns named 'longs' and
# 'shorts'.
pipeline_data = context.pipeline_data
all_assets = pipeline_data.index
longs = all_assets[pipeline_data.longs]
shorts = all_assets[pipeline_data.shorts]
record(universe_size=len(all_assets))
# Build a 2... | Review this code and list any quality issues. | [
{
"issue": "There's still a window between the delisting and the auto-close firing where this can be hit.",
"severity": "minor",
"line": 26
}
] | 1 |
python | self._bind_var_val(on_action_name, on_action)
on_action = on_action_name
else:
_warn("download() on_action is invalid.")
content_str = self._get_content("Gui.download", content, False)
self.__send_ws_download(content_str, str(name), str(on_action) if on_action... | Review this code and list any quality issues. | [
{
"issue": "This should not be optional. ... or how come would it be?",
"severity": "minor",
"line": 26
}
] | 1 |
python | python -m monai.bundle run --net#input_chns 1 ...
# Override config values with another config file `/path/to/another.json`:
python -m monai.bundle run --net %/path/to/another.json ...
# Override config values with part content of another config file:
python -m monai.bundle run --net %... | Review this code and list any quality issues. | [
{
"issue": "It's really key for what's going here that the default value for `workflow_name` will be `ConfigWorkflow` is `None` is passed as the argument, it's worth commenting here that that's the case.",
"severity": "minor",
"line": 26
}
] | 1 |
python | if (value := self.metadata.get("trackNumber")) is not None:
return int(value)
return None
@property
def media_duration(self) -> int | None:
"""Duration of current playing media in seconds."""
if (value := self.metadata.get("duration")) is not None:
return int(va... | Review this code and list any quality issues. | [
{
"issue": "Grammar: \"does not exists\" should be \"does not exist\".\n```suggestion\n ): # the stream function raises KeyError if the stream does not exist\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from random import setstate as python_set_rng_state
from typing import Any, Optional
import torch
from lightning.fabric.utilities.imports import _NUMPY_AVAILABLE
from lightning.fabric.utilities.rank_zero import _get_rank, rank_prefixed_message, rank_zero_only, rank_zero_warn
log = logging.getLogger(__name__)
max_s... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n ``PL_GLOBAL_SEED`` env variable is not set, then the seed defaults to 0. If seed is\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | """
return None
@classmethod
def handle_boolean_filter(
cls, sqla_col: Any, op: str, value: bool
) -> BinaryExpression:
"""
Handle boolean filter operations with engine-specific logic.
By default, uses SQLAlchemy's IS operator (column IS true/false).
Engines... | Review this code and list any quality issues. | [
{
"issue": "We could be more strict in the `op` type here, to have the type checker catch incorrect calls to this method:\r\n\r\n```suggestion\r\n def handle_null_filter(\r\n cls,\r\n sqla_col: Any,\r\n op: utils.FilterOperator.IS_NULL | utils.FilterOperator.IS_NOT_NULL,\r\n ) -> Bina... | 1 |
python | def __hash__(self):
if self.tags is None:
return hash(
(
self.fmt,
self.model_name,
self.world_size,
self.worker_id,
self.chunk_hash,
)
)
return has... | Review this code and list any quality issues. | [
{
"issue": "Hey @sdimitro , I thought you fixed some problems regarding the chunk hash format in #1299. Can you quickly check the code here?\r\n\r\nI think we need this modification since the `from_string ` are using something like `int(chunk_hash, 16)`. But just wanted to double check",
"severity": "minor"... | 1 |
python | 'info_dict': {
'title': 'The Secret Language of Trees',
'id': '742779548009',
'thumbnail': 'https://www.monstercat.com/release/742779548009/cover',
'release_year': 2023,
'release_date': '20230711',
'album': 'The Secret Language of Trees',
... | Review this code and list any quality issues. | [
{
"issue": "if we have ID variables already, then IMO it's simpler to inline f-string here instead of using class var\r\n```suggestion\r\n 'url': f'https://www.monstercat.com/api/release/{release_id}/track-stream/{track_id}',\r\n 'id': track_id,\r\n```",
"severity": "minor",
... | 1 |
python | class _GuiCoreDatanodeAdapter(_TaipyBase):
@staticmethod
def _is_tabular_data(datanode: DataNode, value: t.Any):
return isinstance(datanode, _TabularDataNodeMixin) or isinstance(
value, (pd.DataFrame, pd.Series, list, tuple, dict)
)
def __get_data(self, dn: DataNode):
if... | Review this code and list any quality issues. | [
{
"issue": "do you want to use the JsonAdapter that we use in the gui",
"severity": "minor",
"line": 26
}
] | 1 |
python | _protocol_check: ClassVar[BlocksProtocol] = cast("AugmentedBlockchain", None)
_underlying: BlocksProtocol
_extra_blocks: dict[bytes32, tuple[FullBlock, BlockRecord]]
_height_to_hash: dict[uint32, bytes32]
def __init__(self, underlying: BlocksProtocol) -> None:
self._underlying = underlying
... | Review this code and list any quality issues. | [
{
"issue": "I don't think this is quite right. `_height_to_hash` will be empty if the underlying blockchain hasn't been augmented, right?\n\nYou may have to ask `self._blockchain` for the peak hash in that case.\n\nI suspect if you fix this, you may not need to make the other changes to the test.",
"severit... | 1 |
python | import fire
from metagpt.actions import Action, UserRequirement
from metagpt.logs import logger
from metagpt.roles import Role
from metagpt.schema import Message
from metagpt.team import Team
class SpeakAloud(Action):
"""Action: Speak out aloud in a debate (quarrel)"""
PROMPT_TEMPLATE: str = """
## BACKG... | Review this code and list any quality issues. | [
{
"issue": "Run the commands below to fix coding standards:\r\n\r\n```shell\r\npip install pre-commit\r\npre-commit install\r\npre-commit run --all-files # make sure all files are clean\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | The maximal width of the rendered videos that are displayed in the notebook can be
configured via the ``media_width`` configuration option. The default is set to ``25vw``,
which is 25% of your current viewport width. To allow the output to become as large
as possible, set... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n Evaluating this cell will render and display the ``BannerExample`` scene defined in the body of the cell.\r\n \r\n .. note::\r\n\r\n In case you want to hide the red box containing the output progress bar, the ``progress_bar`` config\... | 1 |
python | return cls
T = TypeVar('T', bound='_FunctionWithSchema')
class _FunctionWithSchema(NamedTuple):
fn: Callable
request_schema: Type[DocumentArray] = DocumentArray
response_schema: Type[DocumentArray] = DocumentArray
@staticmethod
def get_function_with_schema(fn: Callable) -> T:
docs_anno... | Review this code and list any quality issues. | [
{
"issue": "Maybe u can add something specific to `Optional` that would be the most common usecase",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Test thinking tags handling in Memory._add_to_vector_store (sync)."""
memory, mock_llm, mock_vector_store = create_mocked_memory()
# Mock LLM responses for both phases
mock_llm.generate_response.side_effect = [
' <think>Sync fact extraction</think> \n{"facts": ["User loves sci-fi"]}'... | Review this code and list any quality issues. | [
{
"issue": "A bit nit picking over here, but the test function name can be bitter, which doesn't have this long sentence like name.",
"severity": "minor",
"line": 26
}
] | 1 |
python | },
}]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(f'https://www.moviepilot.de/movies/{video_id}/trailer', video_id)
duration = try_get(
re.match(r'P(?P<hours>\d+)H(?P<mins>\d+)M(?P<secs>\d+)S',
self._ht... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'timestamp': parse_iso8601(self._html_search_meta('uploadDate', webpage), delimiter=' ')\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | msg.finished = None
# Tell the monitor that we've finished triggers so it can update things
try:
resp = await self.comms_decoder.asend(msg)
except asyncio.IncompleteReadError:
if task := asyncio.current_task():
task.cancel("EOF - shutting down")
... | Review this code and list any quality issues. | [
{
"issue": "Nice, optimistic strategy with fallback.",
"severity": "minor",
"line": 26
}
] | 1 |
python | on-maximum suppression.
Raises:
AssertionError: If `iou_threshold` is not within the
closed range from `0` to `1`.
"""
assert 0 <= iou_threshold <= 1, (
"Value of `iou_threshold` must be in the closed range from 0 to 1, "
f"{iou_threshold} given."
)
rows, columns... | Review this code and list any quality issues. | [] | 0 |
python | continue
# names_to_path() validates the lookup. A descriptive
# FieldError will be raise if it's not.
self.names_to_path(item.split(LOOKUP_SEP), self.model._meta)
elif not hasattr(item, "resolve_expression"):
errors.append(item)
if... | Review this code and list any quality issues. | [
{
"issue": "If there is no use case it means it's dead code from its inception and thus and it can be removed.\r\n\r\n`Query.group_by` appears to be `None | True | tuple[Compilable]`",
"severity": "minor",
"line": 26
}
] | 1 |
python | GET_CLUSTER_ENDPOINT = ("GET", "2.0/clusters/get")
RESTART_CLUSTER_ENDPOINT = ("POST", "2.0/clusters/restart")
START_CLUSTER_ENDPOINT = ("POST", "2.0/clusters/start")
TERMINATE_CLUSTER_ENDPOINT = ("POST", "2.0/clusters/delete")
CREATE_ENDPOINT = ("POST", "2.1/jobs/create")
RESET_ENDPOINT = ("POST", "2.1/jobs/reset")
U... | Review this code and list any quality issues. | [
{
"issue": "This endpoint unfortunately does not exist and I even do think that has been migrated to: https://docs.databricks.com/api/workspace/warehouses/list\r\n```\r\n[2026-01-13 03:32:41] ERROR - Task failed with exception source=task loc=task_runner.py:986\r\nAirflowException: Response: {\"error\":\"Bad Ta... | 1 |
python | assert_type(np.frexp.identity, None)
assert_type(np.frexp.nin, Literal[1])
assert_type(np.frexp.nout, Literal[2])
assert_type(np.frexp.nargs, Literal[3])
assert_type(np.frexp.signature, None)
assert_type(np.frexp(f8), tuple[Any, Any])
assert_type(np.frexp(AR_f8), tuple[npt.NDArray[Any], npt.NDArray[Any]])
assert_type(... | Review this code and list any quality issues. | [] | 0 |
python | If defined the given string must only contain the following characters: "l"
(left), "c" (centered) and "r" (right).
row_heights
Specific heights for certain rows (from top to bottom). The given list can contain
`None`. In that case the corresponding row will fit its height au... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n .. note:: If both :code:`cell_alignment` and :code:`row_alignments` / :code:`col_alignments` are\r\n defined, the latter has higher priority.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if transform is not None:
transform = transforms.blended_transform_factory(
transform, self._parent.transAxes) # Use provided x axis
# If no transform is provided, use the parent's transAxes
if transform is None:
transform = self._parent.transAxes
... | Review this code and list any quality issues. | [
{
"issue": "Why both types of `if` checks? Are you expecting this to occur on 3D or some other `Axes` type?",
"severity": "minor",
"line": 26
}
] | 1 |
python | @property
def system(self) -> str:
"""The model provider."""
return self._provider.name
def prepare_request(
self, model_settings: ModelSettings | None, model_request_parameters: ModelRequestParameters
) -> tuple[ModelSettings | None, ModelRequestParameters]:
supports_native... | Review this code and list any quality issues. | [
{
"issue": "I don't think this is accurate anymore, as `GoogleJsonSchemaTransformer` does not inline defs.\r\n\r\nI think all of this `customize_request_parameters` code should be unnecessary now right?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import os
from pathlib import Path
from unittest.mock import Mock
import pytest
from pip._vendor.cachecontrol.caches import FileCache
from pip._internal.network.cache import SafeFileCache
from tests.lib.filesystem import chmod
@pytest.fixture
def cache_tmpdir(tmpdir: Path) -> Path:
cache_dir = tmpdir.joinpath("... | Review this code and list any quality issues. | [
{
"issue": "This looks a bit weird, but most of our test files aren't this tiny :)",
"severity": "minor",
"line": 1
}
] | 1 |
python | import subprocess
import time
import os
import shutil
import tempfile
import pytest
from django.conf import settings
from awx.api.versioning import reverse
# These tests are invoked from the awx/main/tests/live/ subfolder
# so any fixtures from higher-up conftest files must be explicitly included
from awx.main.test... | Review this code and list any quality issues. | [
{
"issue": "I just keep getting burned by this.",
"severity": "minor",
"line": 24
}
] | 1 |
python | import json
import os
from typing import Dict, List, Optional
from openai import OpenAI
from mem0.configs.llms.base import BaseLlmConfig
from mem0.llms.base import LLMBase
class OpenAILLM(LLMBase):
def __init__(self, config: Optional[BaseLlmConfig] = None):
super().__init__(config)
if not self.... | Review this code and list any quality issues. | [
{
"issue": "You should either add `OPENROUTER_API_BASE` or it's good to keep `\"https://openrouter.ai/api/v1\"` as default in config.",
"severity": "minor",
"line": 21
}
] | 1 |
python | self.state = ConnectionFlowState.got_ip_discovery
while self.ws.secret_key is None:
await self.ws.poll_event()
self.state = ConnectionFlowState.connected
def _create_socket(self) -> None:
self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.socket.setblock... | Review this code and list any quality issues. | [
{
"issue": "4021 and 4022 are documented as non-resumable. https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
from ..utils import ExtractorError, traverse_obj
class RudoVideoIE(InfoExtractor):
_VALID_URL = r'https?://rudo\.video/live/(?P<id>[^/]+)'
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
if... | Review this code and list any quality issues. | [
{
"issue": "Can be written as:\r\n```suggestion\r\n token_array = self._search_json(\r\n r'<script>var\\s+_\\$_[a-zA-Z0-9]+\\s*=', webpage, 'access token array', video_id,\r\n contains_pattern=r'\\[(?s:.+)\\]', default=None, transform_source=js_to_json)\r\n if token_array:\r\... | 1 |
python | # ROCm
# ============================================================
elif has_working_rocm() and has_amd_gpu_pci():
version = ''
msg = ''
if os.name == 'posix':
for p in (
'/opt/rocm/.info/version',
... | Review this code and list any quality issues. | [] | 0 |
python | def prepare_tensors(self):
super().prepare_tensors()
if self._experts is not None:
# flatten `list[dict[str, Tensor]]` into `list[str]`
experts = [k for d in self._experts for k in d.keys()]
if len(experts) > 0:
raise ValueError(f"Unprocessed experts:... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n self.gguf_writer.add_sliding_window(self.hparams[\"local_attention\"])\r\n if (sliding_window_pattern := self.hparams.get(\"global_attn_every_n_layers\")) is not None:\r\n self.gguf_writer.add_sliding_window_pattern(sliding_window_pattern)\r\n```",
"sev... | 1 |
python | class TestUploadFileobj(BaseTransferTest):
def setUp(self):
super(TestUploadFileobj, self).setUp()
self.contents = six.BytesIO(b'foo\n')
def stub_put_object(self):
put_object_response = {
"ETag": self.etag,
"ResponseMetadata": {
"HTTPStatusCode": ... | Review this code and list any quality issues. | [] | 0 |
python | 'track_id': '30576943',
'timestamp': 1554474370029,
},
}, {
'url': 'https://api.idagio.com/v2.0/metadata/tracks/20514478',
'md5': '3acef2ea0feadf889123b70e5a1e7fa7',
'info_dict': {
'id': '20514478',
'ext': 'mp3',
'title': 'Sonata for Pi... | Review this code and list any quality issues. | [
{
"issue": "yt-dlp code style would not include type information and break the lines differently. Also `track_info` is non-mandatory, right? So might as well make it non-fatal and get the `result` key below.\r\n```suggestion\r\n track_id = self._match_id(url)\r\n track_info = self._download_json(\... | 1 |
python | (11.428571428571416, 0.043514520866727614)
The p-value is less than 0.05; however, as noted above, the results may not
be reliable since we have a small number of repeated samples.
For a more detailed example, see :ref:`hypothesis_friedmanchisquare`.
"""
k = len(samples)
if k < 3:
rais... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # Handle ties\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def run_program(script_path, args):
args = [sys.executable] + [script_path] + args
print(f"running: '{args}'")
return subprocess.run(args, stdout=subprocess.PIPE)
def test_proto_conversion(tmpdir):
t = tmpdir.mkdir("proto-test")
json = os.path.join(CD, "data", "rd", "Practical Malware Analysis La... | Review this code and list any quality issues. | [
{
"issue": "this can added here: https://github.com/mandiant/capa/pull/1463/files#diff-77d9a7b27446244085674121ddc1e16fa75a37e2b4c8c27cf5ab8fcffedea7aaL44",
"severity": "minor",
"line": 26
}
] | 1 |
python | # We should not treat the trailing comma
# in a single-element subscript.
a: tuple[int,]
b = tuple[int,]
# The magic comma still applies to multi-element subscripts.
c: tuple[int, int,]
d = tuple[int, int,]
# output
# We should not treat the trailing comma
# in a single-element subscript.
a: tuple[int,]
b = tuple[int... | Review this code and list any quality issues. | [
{
"issue": "Can you try some cases like `[int,]` in a list, outside a subscript?",
"severity": "minor",
"line": 1
}
] | 1 |
python | recording_id).get('result')
track_ids: list[int] = traverse_obj(recording_info, ('tracks', ..., 'id'))
return {
'_type': 'multi_video',
'ext': 'mp3',
'id': recording_id,
'entries': [self.url_result(f'https://app.idagio.com/recordings/{recording_id}?track... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n _VALID_URL = r'https?://(?:www\\.)?app\\.idagio\\.com/albums/(?P<id>[\\w-]+)'\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | chunks = tuple(map(int, chunks))
return tuple(
((bd,) * (d // bd) + ((d % bd,) if d % bd else ()) if d else (0,))
for d, bd in zip(shape, chunks)
)
def finalize(results):
if not results:
return concatenate3(results)
results2 = results
while isinstance(results2, (tuple, list... | Review this code and list any quality issues. | [
{
"issue": "Can we cross this bridge when we get there? This is currently not something that we are working or focusing on",
"severity": "minor",
"line": 26
}
] | 1 |
python | step: Step number at which the metrics should be recorded
"""
pass
@staticmethod
def _convert_params(params: Union[Dict[str, Any], Namespace]) -> Dict[str, Any]:
# in case converting from namespace
if isinstance(params, Namespace):
params = vars(params)
if p... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \"\"\"\r\n Sanitize callable params dict, e.g. ``{'a': <function_**** at 0x****>} -> {'a': 'function_****'}``.\r\n\r\n Args:\r\n params: Dictionary containing the hyperparameters\r\n\r\n Returns:\r\n dictionary with all callables sa... | 1 |
python | token = self._search_regex(
r"_icareus\['token'\]\s*=\s*'([a-f0-9]+)'", page, "token")
token2 = self._search_regex(
r"""data\s*:\s*{action:"getAsset".*?token:'([a-f0-9]+)'}""", page,
"token2", default=None, fatal=False)
livestream_title = get_element_by_class(
... | Review this code and list any quality issues. | [
{
"issue": "doesn't need to be a var. Same below",
"severity": "minor",
"line": 26
}
] | 1 |
python | lambda x: x['thumbnailRenderer']['playlistVideoThumbnailRenderer']['thumbnail']['thumbnails'],
list)
or [])
thumbnails = []
for t in thumbnails_list:
if not isinstance(t, dict):
continue
thumbnail_url = url_or_none(t.get('url')... | Review this code and list any quality issues. | [
{
"issue": "wonder if its worth removing time_text being returned. only used in comments in which that isn't supposed to be used anyways.",
"severity": "minor",
"line": 26
}
] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.