language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
entry_id = self._html_search_meta('entryId', webpage, 'entryId', fatal=True)
video_info = self._download_json(
f'https://learn.microsoft.com/api/video/public/v1/entri... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n _VALID_URL = r'https?://learn\\.microsoft\\.com/(?:[\\w-]+/)?events/[\\w-]+/(?P<id>[^?#/]+)'\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return player_js_cache
webpack_js_url = self._proto_relative_url(self._search_regex(
r'<script src="((?:https?:)?//stc\.iqiyipic\.com/_next/static/chunks/webpack-\w+\.js)"', webpage, 'webpack URL'))
webpack_js = self._download_webpage(webpack_js_url, video_id, note='Downloading webpack JS', ... | Review this code and list any quality issues. | [
{
"issue": "If the other suggestion is applied, then we can just do this, no?\r\n```suggestion\r\n for module_index in reversed(webpack_map):\r\n real_module = replacement_map.get(module_index) or module_index \r\n module_js = self._download_webpage(\r\n f'https://stc... | 1 |
python | def _real_extract(self, url):
video_id = self._match_id(url)
url, smuggled_data = unsmuggle_url(url, {})
impersonate = self._configuration_arg('impersonate', [''])
try:
webpage = self._request_webpage(url, video_id, headers=filter_dict({
'Accept-Encoding': 'id... | Review this code and list any quality issues. | [
{
"issue": "We can use `traverse_obj` and its transformation syntax with `yt_dlp.utils.parse_qs` and other utils to reduce this to a couple lines of code:\r\n```suggestion\r\n m3u8_url = traverse_obj(iframe_url, (\r\n {parse_qs}, 'source', -1, {self._proto_relative_url}, {url_or_none}, {requir... | 1 |
python | __slots__ = ('thread_id', 'thread_type', 'parent_id', 'guild_id', 'thread')
def __init__(self, data: ThreadDeleteEvent) -> None:
self.thread_id: int = int(data['id'])
self.thread_type: ChannelType = try_enum(ChannelType, data['type'])
self.guild_id: int = int(data['guild_id'])
self.... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n The raw data given by the :ddocs:`gateway <topics/gateway#thread-members-update>`.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | model=self.model_name,
instructions=instructions,
parallel_tool_calls=model_settings.get('parallel_tool_calls', OMIT),
tools=tools or OMIT,
tool_choice=tool_choice or OMIT,
max_output_tokens=model_settings.get('max_tokens', OMIT),
... | Review this code and list any quality issues. | [
{
"issue": "needless comment, please remove",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Don't allow setting preferred border agent ID without setting
# preferred extended address
if preferred_border_agent_id is not None and preferred_extended_address is None:
raise HomeAssistantError(
"Must set preferred extended address with preferred border agent ID"
... | Review this code and list any quality issues. | [] | 0 |
python | def extract_call_features(
self, ph: ProcessHandle, th: ThreadHandle, ch: CallHandle
) -> Iterator[Tuple[Feature, Address]]:
yield from capa.features.extractors.cape.call.extract_features(ph, th, ch)
@classmethod
def from_report(cls, report: Dict) -> "CapeExtractor":
cr = CapeReport... | Review this code and list any quality issues. | [
{
"issue": "such empty reports are fairly useless",
"severity": "minor",
"line": 26
}
] | 1 |
python | # ]
# ///
from __future__ import annotations
import argparse
import ast
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.resolve()))
from common_prek_utils import console
def check_file_for_core_imports(file_path: Path) -> list[tuple[int, str]]:
"""Check file for airflow-core imp... | Review this code and list any quality issues. | [
{
"issue": "Yep - look at our sphinx.ext code:\n\n```python\n if isinstance(node, (ast.Import, ast.ImportFrom)):\n for alias in node.names:\n module_prefix = f\"{node.module}.\" if hasattr(node, \"module\") and node.module else \"\"\n imports[alias.asname or alias... | 1 |
python | return get_conv_template("vicuna_v1.1")
def raise_warning_for_old_weights(self, model):
if isinstance(model, LlamaForCausalLM) and model.model.vocab_size > 32000:
warnings.warn(
"\nYou are probably using the old Vicuna-v0 model, "
"which will generate unexpected ... | Review this code and list any quality issues. | [] | 0 |
python | 'modified_date': str,
'thumbnail': r"re:http://i\d\.hdslb\.com/bfs/archive/14b83c62aa8871b79083df1e9ab4fbc699ad16fe\.jpg",
'view_count': int,
'like_count': int,
},
'playlist_mincount': 22,
}, {
'url': 'https://www.bilibili.com/medialist/detail/ml1103407912... | Review this code and list any quality issues. | [
{
"issue": "To go along with the suggestion for `BilibiliSpaceListBaseIE._get_entries()`:\r\n```suggestion\r\n entries = self._get_entries(self._download_json(\r\n f'https://api.bilibili.com/x/v3/fav/resource/ids?media_id={fid}',\r\n fid, note='Download favlist entries'), 'data')\r\... | 1 |
python | @staticmethod
def get_impl_cls() -> type["FlashAttnMLAImpl"]:
return FlashAttnMLAImpl
@classmethod
def supports_compute_capability(cls, capability: DeviceCapability) -> bool:
return capability.major == 9
@classmethod
def supports_combination(
cls,
head_size: int,
... | Review this code and list any quality issues. | [
{
"issue": "I don't think we even need this because we removed it completely from the layer, right?",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Test vacuum clean_area action."""
# Fetch translations
await async_setup_component(hass, "homeassistant", {})
entity_id = "vacuum.mock_vacuum"
state = hass.states.get(entity_id)
assert state
# Verify CLEAN_AREA feature is supported
# Get the entity component to access entity
componen... | Review this code and list any quality issues. | [
{
"issue": "Call the service action instead.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _real_extract(self, url):
video_uuid = self._match_id(url)
metadata = self._download_json(self._VIDEO_METADATA_URL % video_uuid, video_uuid)
video_id = None
title = None
for section in metadata.get('sections', {}):
if section.get('type') == 'Player':
... | Review this code and list any quality issues. | [
{
"issue": "And then we can inline the metadata extraction \r\n```suggestion\r\n return self.url_result(\r\n self._BC_URL_TMPL.format(brightcove_video_id), BrightcoveNewIE, brightcove_video_id,\r\n url_transparent=True,\r\n **traverse_obj(metadata, ('sections', lambda _, ... | 1 |
python | # listsinceblock(nodes1_last_blockhash) should now include tx as seen from nodes[0]
# and return the block height which listsinceblock now exposes since a5e7795.
transactions = self.nodes[0].listsinceblock(nodes1_last_blockhash)['transactions']
found = next(tx for tx in transactions if tx['txid'... | Review this code and list any quality issues. | [
{
"issue": "nit:\r\n\r\nThis `self.nodes[0].blocks_path / \"blk...\" / ...` is a [`Path`](https://docs.python.org/3/library/pathlib.html) so you don't need to `import os` to call `os.rename` to rename it, you can instead:\r\n\r\n```suggestion\r\n (self.nodes[0].blocks_path / \"blk00000.dat\").rename(\"bl... | 1 |
python | break
else:
logger.warning(
f"Failed to find interface name between {node_i.node_id} and {node_j.node_id}"
)
raise ValueError(
"Current ibv backend requires all-to-all rdma connections"
)
return matr... | Review this code and list any quality issues. | [
{
"issue": "This was a little hacky to return `is_thunderbolt` here. Might consider refactoring (could return the connection objects instead for example.",
"severity": "major",
"line": 26
}
] | 1 |
python | }),
)
user_has_subscription = self._search_regex(
r'user_has_subscription:\s*["\'](.+?)["\']', response, 'subscription status', default='none',
)
if user_has_subscription.lower() == 'true':
return
elif user_has_subscription.lower() == 'false':
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n webpage = self._download_webpage(url, display_id)\r\n if '<div id=\"watch-unauthorized\"' in webpage:\r\n if self._get_cookies('https://www.softwhiteunderbelly.com').get('_session'):\r\n raise ExtractorError('This account is not subscribed to... | 1 |
python | local_cpu_backend=local_cpu_backend,
loop=loop,
)
# Add to storage backends
storage_backends[storage_plugin] = backend_instance
logger.info(f"Created dynamic backend: {storage_plugin}")
except Exception as e:
logger.error(f"Failed to ... | Review this code and list any quality issues. | [] | 0 |
python | )
),
vol.Optional(CONF_UNITS, default=METRIC_UNITS): SelectSelector(
SelectSelectorConfig(
options=UNITS,
mode=SelectSelectorMode.DROPDOWN,
translation_key=CONF_UNITS,
sort=True,
)
),
vol.Optional(CON... | Review this code and list any quality issues. | [
{
"issue": "If value can be negative, I think you want `allow_negative` option set?\n\nhttps://www.home-assistant.io/docs/blueprint/selectors/#allow_negative",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.write_debug(e, only_once=True)
else:
self.report_warning(
'Cannot decrypt nsig without player_url: Some formats may be missing',
video_id=video_id, only_once=True)
continue
tbr = flo... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n pot_policy, fmt[STREAMING_DATA_IS_PREMIUM_SUBSCRIBER],\r\n fmt[STREAMING_DATA_PLAYER_TOKEN_PROVIDED]))\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | sparklines=sparklines,
formulas=formulas,
)
# normalise cell refs (eg: "B3" => (2,1)) and establish table start/finish,
# accounting for potential presence/absence of headers and a totals row.
table_start = (
xl_cell_to_rowcol(position) if isinstance(position, st... | Review this code and list any quality issues. | [
{
"issue": "The frame may not be too large - it may be output somewhere on the sheet where it won't fit; let's tweak the message like so, to include the position, dimensions, and use the established max Excel row/col variables:\r\n```suggestion\r\n msg = f\"writing {df.height}x{df.width} frame at {po... | 1 |
python | types.TextContent(
type="text",
text=text,
)
]
@mcp.tool(
name="save_interaction", description="Logs user-agent interactions and query-answer pairs"
)
async def save_interaction(data: str) -> list:
"""
Transform and save a user-agent interaction into structured knowledg... | Review this code and list any quality issues. | [
{
"issue": "Is this something that cursor will call and provide interactions between user and cursor?\r\nWe also collect the search history in our system, not sure if that can be useful.",
"severity": "minor",
"line": 26
}
] | 1 |
python | first_asset_auto_close_date = assets[0].auto_close_date
def initialize(context):
pass
def handle_data(context, data):
# The only order we place in this test should never be filled.
assert (
context.portfolio.cash == context.portfolio.starting_cash
... | Review this code and list any quality issues. | [
{
"issue": "This might be more clear as `self.trading_calendar.next_session(first_asset_auto_close_date)`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'unicode_escape').split('=')[-1]
self._downloader.cookiejar.clear(domain='.google.com', path='/', name='NID')
return {
'id': video_id,
'title': title,
'thumbnail': 'https://drive.google.com/thumbnail?id=' + video_id,
'duration': int_or_none(get_value('le... | Review this code and list any quality issues. | [
{
"issue": "Add a test with non-piracy content!",
"severity": "minor",
"line": 26
}
] | 1 |
python | # patch.
@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 fou... | Review this code and list any quality issues. | [
{
"issue": "`@patch(\"pathlib.Path.is_file\", ...)` looks unnecessary here because the test passes a callable (`lambda: None`) to `st.Page`, so the `Path.is_file()` branch isn’t exercised. Removing the patch would reduce test noise.",
"severity": "minor",
"line": 26
}
] | 1 |
python | ]
def __init__(self, *args, **kwargs):
super().__init__(settings.METRICS_SERVICE_DISPATCHER, *args, **kwargs)
class CallbackReceiverMetrics(Metrics):
METRICSLIST = [
SetIntM('callback_receiver_events_queue_size_redis', 'Current number of events in redis queue'),
IntM('callback_receive... | Review this code and list any quality issues. | [
{
"issue": "is there any reason we can't get metrics via dispatcherctl? seems unix socket might be more reliable / robust than http server",
"severity": "minor",
"line": 26
}
] | 1 |
python | info_dict = {
'id': video_id,
'title': post_json.get('summary') or (blog if api_only else self._html_search_regex(
r'(?s)<title>(?P<title>.*?)(?: \| Tumblr)?</title>', webpage, 'title', default=blog)),
'description': description,
'uploader_id': uploader_id... | Review this code and list any quality issues. | [
{
"issue": "I think we can do this, and reduce indentation below\r\n```suggestion\r\n for video_json in traverse_obj(content_json, lambda _, v: v['type'] in ('video', 'audio')):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | estimator,
X_grid,
response_method=prediction_method,
pos_label=class_of_interest,
return_response_method_used=True,
)
except ValueError as exc:
if "is not a valid label" in str(exc):
# re-raise a more inform... | Review this code and list any quality issues. | [
{
"issue": "I had to move inferring `n_classes` up here before the `response` reshaping, so that `type_of_target` works properly.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'url': 'https://livestreamfails.com/clip/139200',
'md5': '8a03aea1a46e94a05af6410337463102',
'info_dict': {
'id': '139200',
'ext': 'mp4',
'display_id': 'ConcernedLitigiousSalmonPeteZaroll-O8yo9W2L8OZEKhV2',
'title': 'Streamer jumps off a trampoline at full... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'thumbnail': format_field(api_response, 'imageId', 'https://livestreamfails-image-prod.b-cdn.net/image/%s')\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | "Cannot compile forward without an existing cache with Hybrid, as `torch._dynamo.mark_static_address` "
"is a forbidden call."
)
model = model_class(config)
sub_models_supporting_sdpa = [
module._supports_sdpa
for name, module... | Review this code and list any quality issues. | [
{
"issue": "fixes failures observed in https://huggingface.co/datasets/hf-internal-testing/transformers_daily_ci/raw/3fed21c3fdb63a1b19d6030d493139a947135fd3/2026-01-06/ci_results_run_models_gpu/new_failures_with_bad_commit_grouped_by_authors.json",
"severity": "critical",
"line": 26
}
] | 1 |
python | headers=headers,
payload=payload,
keep_url_fragment=keep_url_fragment,
use_extended_unique_key=use_extended_unique_key,
)
if always_enqueue:
unique_key = f'{unique_key}_{crypto_random_object_id()}'
id = id or unique_key_to_request_id(unique_key)
... | Review this code and list any quality issues. | [
{
"issue": "I think it would be better to put this under `crawlee_data`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | if not order_field:
continue # No 'admin_order_field', skip it
if isinstance(order_field, OrderBy):
if pfx == "-":
order_field = order_field.copy()
order_field.reverse_ordering()
... | Review this code and list any quality issues. | [
{
"issue": "Sorry, I intended for the comments from the above deleted block to travel together with the code they describe to their new home in query.py.",
"severity": "minor",
"line": 26
}
] | 1 |
python | np.array(tensor.int32_data, dtype=np.int32)
.view(np.uint32)
.astype(np.uint8)
.view(np_dtype)
.reshape(dims)
)
if tensor_dtype in {
onnx.TensorProto.UINT4,
onnx.TensorProto.INT4,
onnx.TensorProto.FLOAT4E2M1,
}:
data = (
... | Review this code and list any quality issues. | [
{
"issue": "For this to be more robust, we may need to check the current byte order of the array. For example, what happens if the array is already in small endian on a big endian system?",
"severity": "minor",
"line": 26
}
] | 1 |
python | webpage = self._download_webpage(self._TEMPLATE_URL % (scheme, uid, playlist_id), playlist_id,
note='Download album page for %s' % playlist_id,
errnote='Unable to get album info')
title = self._html_search_regex(r'<h1 class="titl... | Review this code and list any quality issues. | [
{
"issue": "use `self._proto_relative_url` to set the scheme and drop self.scheme",
"severity": "minor",
"line": 26
}
] | 1 |
python | import contextlib
import itertools
import sys
import traceback
import types
import unittest
import warnings
from test import support
from test.support import import_helper, swap_attr
_testinternalcapi = import_helper.import_module('_testinternalcapi')
_interpreters = import_helper.import_module('_interpreters')
from ... | Review this code and list any quality issues. | [
{
"issue": "Nitpick: I would not mix a submodule import with other data import. Since you already imported `support`, why not use `support.swap_attr`?",
"severity": "minor",
"line": 10
}
] | 1 |
python | def async_manage_coiot_unconfigured_issue(
hass: HomeAssistant,
entry: ShellyConfigEntry,
) -> None:
"""Manage the CoIoT unconfigured issue."""
issue_id = COIOT_UNCONFIGURED_ISSUE_ID.format(unique=entry.unique_id)
if TYPE_CHECKING:
assert entry.runtime_data.block is not None
device = e... | Review this code and list any quality issues. | [
{
"issue": "We need to filter the model here so we don't create the issue at first place.\r\nI think it also worth adding a test for this specific case afterwards.",
"severity": "minor",
"line": 26
}
] | 1 |
python | timestamp = datetime.utcnow().replace(microsecond=0)
for package in packages_for_platform(platform):
if path.isdir(package):
continue
if not path.isfile(package):
print("Could not find package for {} at {}".format(platform, package), file=sys.stderr)
... | Review this code and list any quality issues. | [
{
"issue": "`--target` is a rust target triple in all our other commands. Maybe we should just make it a positional parameter? Or something like `--new-version`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | **kwargs,
) -> None:
"""Initialize a RayWorkerGroup.
Args:
resource_pool: Resource pool for worker allocation
ray_cls_with_init: Class with initialization arguments for workers
bin_pack: Whether to use strict bin packing for resource allocation
name_p... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n self.device_name = kwargs.get(\"device_name\", \"cuda\") if not is_torch_npu_available() else \"npu\"\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | dark: Self | None = None,
) -> Self:
"""Returns one of two colors, light or dark (by default white or black),
that contrasts with the current color (depending on its luminance).
This is typically used to set text in a contrasting color that ensures
it is readable against a background... | Review this code and list any quality issues. | [
{
"issue": "We should use the exisisting ManimColor constants for black and white; they can be accessed by adding a local import in the method (not at the top of the file, to avoid introducing an import loop):\r\n\r\n```suggestion\r\n from manim.utils.color.manim_colors import WHITE, BLACK\r\n\r\n ... | 1 |
python | 'http://api.m.afreecatv.com/catchstory/a/view', video_id, headers={'Referer': url},
query={'aStoryListIdx': '', 'nStoryIdx': video_id}).get('data', [])
entries = []
for story in data:
if story.get('story_type') != 'catch':
break
for catch in story.get(... | Review this code and list any quality issues. | [
{
"issue": "- avoid append loops for entries, use a generator/PagedList when possible\r\n- we can use traversal to filter for what we need, check value types, and transform values\r\n- `write_timestamp` is found in `catch`, not `file`\r\n- `duration` is in milliseconds, we need to convert\r\n- the URLs are m3u8... | 1 |
python | "vid": "10CF",
},
{
"domain": "velbus",
"pid": "0518",
"vid": "10CF",
},
{
"description": "*2652*",
"domain": "zha",
"pid": "EA60",
"vid": "10C4",
},
{
"description": "*slzb-07*",
"domain": "zha",
"pid": "EA60",
... | Review this code and list any quality issues. | [] | 0 |
python | from abc import ABC, abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from crawlee.configuration import Configuration
from crawlee.storage_clients._base import StorageClient
from crawlee.storage_clients.models import _StorageMetadata
class Storage(ABC):
"""Base class for storages."""... | Review this code and list any quality issues. | [
{
"issue": "This is public property, that returns private type. I guess we should expose `_StorageMetadata` if we use it as type hint for public property now.",
"severity": "minor",
"line": 26
}
] | 1 |
python | """
Make sure a link is fully quoted.
For example, if ' ' occurs in the URL, it will be replaced with "%20",
and without double-quoting other characters.
"""
# Split the URL into parts according to the general structure
# `scheme://netloc/path?query#fragment`.
result = urllib.parse.urlsplit(... | Review this code and list any quality issues. | [
{
"issue": "@ichard26 I was indeed confused, thanks for the clarification.\r\n\r\nMaybe a simpler comment like this would have helped my distracted self. What do you think?\r\n\r\n```suggestion\r\ndef _absolute_link_url(base_url: str, url: str) -> str:\r\n \"\"\"A faster implementation of urlib.parse.urljoin... | 1 |
python | class WASDTVRecordIE(WASDTVBaseIE):
IE_NAME = 'wasdtv:record'
_VALID_URL = r'https?://wasd\.tv/[^/#?]+/videos\?record=(?P<id>\d+)$'
_TESTS = [{
'url': 'https://wasd.tv/spacemita/videos?record=907755',
'md5': 'c9899dd85be4cc997816ff9f9ca516ce',
'info_dict': {
'id': '906825... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n return self._fetch(\r\n f'v2/media-containers/{container_id}', container_id, 'media container')\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return notch_min, notch_max
# output is a list of dicts
bxpstats = []
# convert X to a list of lists
X = _reshape_2D(X, "X")
ncols = len(X)
if labels is None:
labels = itertools.repeat(None)
elif len(labels) != ncols:
raise ValueError("Dimensions of labels and X must be co... | Review this code and list any quality issues. | [] | 0 |
python | return {}
def encode(self, prompt: str) -> List[int]:
# `encode` should only be used for prompt completion
# it should never be used for chat_completion.
# For chat completion use `apply_chat_template`
return self.tokenizer.encode(prompt, bos=True, eos=False)
def apply_chat_tem... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n return \"\".join(\r\n t for t in tokens\r\n if t not in self.tokenizer._all_special_tokens\r\n )\r\n```\r\n\r\n`str.join` works on iterables so we can avoid iterating through it twice.",
"severity": "minor",
"line": 26
}... | 1 |
python | "long": long
and {
"interval": long["interval"],
},
}
callback_map[callback_id] = {
"inputs": callback_spec["inputs"],
"state": callback_spec["state"],
"outputs_indices": outputs_indices,
"inputs_state_indices": inputs_state_indices,
"long": l... | Review this code and list any quality issues. | [] | 0 |
python | _testcapi.function_set_closure(function_without_closure, 1)
self.assertIsNone(function_without_closure.__closure__) # no change
# NOTE: this works, but goes against the docs:
_testcapi.function_set_closure(function_without_closure, (1, 2))
self.assertEqual(
_testcapi.functi... | Review this code and list any quality issues. | [
{
"issue": "I don't think that these tests are worth it.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def get_scenarios(
cycle: Optional[Cycle] = None,
tag: Optional[str] = None,
sorted: Optional[bool] = False,
sort_key: Optional[Literal["name", "id", "creation_date", "tags"]] = "name",
) -> List[Scenario]:
"""Retrieve a list of existing scenarios filtered by cycle or tag.
This function allows ... | Review this code and list any quality issues. | [
{
"issue": "I would not explain the sorting order here. If necessary, I think we can explain it right at the `sort_key` param description.",
"severity": "minor",
"line": 26
}
] | 1 |
python | )
# test that a tag can be added if it has ',' in it
TagDAO.create_custom_tagged_objects(
object_type=ObjectType.dashboard.name,
object_id=1,
tag_names=["example,tag,1"],
)
# test that a tag can be added if it has a valid name
TagDAO.create_c... | Review this code and list any quality issues. | [
{
"issue": "are we able to also validate that there's no duplicated tags? or tags association?",
"severity": "major",
"line": 26
}
] | 1 |
python | from functools import partial, wraps
import shutil
import contextlib
from tempfile import mkdtemp, mkstemp
from unittest.case import SkipTest
from warnings import WarningMessage
import pprint
import sysconfig
import concurrent.futures
import threading
import importlib.metadata
import numpy as np
from numpy._core impor... | Review this code and list any quality issues. | [
{
"issue": "Argh, I'm really sorry for not realizing this until now, but it turns out that `np.testing._private.utils.memusage` is re-exported in *the public NumPy API* as `np.testing.memusage`:\r\n\r\n```\r\nIn [1]: import numpy as np\r\n\r\nIn [2]: np.testing.memusage\r\nOut[2]: <function numpy.testing._priva... | 1 |
python | 'description': 'md5:1218e575eeaff75f48ed978261fa2068',
},
'playlist_mincount': 200,
}]
_PAGE_SIZE = 30
def _real_extract(self, url):
podcast_id = self._match_id(url)
webpage = self._download_webpage(url, podcast_id, fatal=False)
metadata = self._extract_metadata(we... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n self.url_result(\r\n f'https://tunein.com/podcasts/{podcast_id}?topicId={episode[\"GuideId\"][1:]}',\r\n TuneInPodcastEpisodeIE, title=episode.get('Title'))\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
class MuxStreamNewIE(InfoExtractor):
IE_NAME = 'stream.new'
_VALID_URL = r'https?://(?:stream\.new/v|player\.mux\.com)/(?P<id>[A-Za-z0-9-]+)'
_EMBED_REGEX = [r'<iframe\b[^>]+\bsrc=["\'](?P<url>(?:https?:)?//(?:stream\.new/v|player\.mux\.com)/(?P<id>[A-Za-z0-9-]+))']
_... | Review this code and list any quality issues. | [
{
"issue": "I would expand the embed detection to detect `<mux-player>` web components like used here https://muxvideo.2coders.com/download/ (please also add as a test)\r\n```suggestion\r\n @classmethod\r\n def _extract_embed_urls(cls, url, webpage):\r\n yield from super()._extract_embed_urls(url, ... | 1 |
python | return sk_confusion_matrix(y_true=sk_target, y_pred=sk_preds, normalize=normalize)
def _multilabel_sk_metric(preds, target, normalize=None):
sk_preds = preds.view(-1).numpy()
sk_target = target.view(-1).numpy()
return sk_confusion_matrix(y_true=sk_target, y_pred=sk_preds, normalize=normalize)
def _mult... | Review this code and list any quality issues. | [] | 0 |
python | 'url': 'https://krimi.iprima.cz/mraz-0/sebevrazdy',
'only_matching': True,
}, {
'url': 'https://cool.iprima.cz/derava-silnice-nevadi',
'only_matching': True,
}, {
'url': 'https://love.iprima.cz/laska-az-za-hrob/slib-dany-bratrovi',
'only_matching': True,
}]
def _... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n data=json.dumps({\r\n 'email': username,\r\n 'password': password,\r\n 'deviceName': 'Windows Chrome',\r\n }).encode(), headers={'content-type': 'application/json'})\r\n```",
"severity": "minor",
"line": 26
... | 1 |
python | # Remove the pipelines subdirectories, if Viz - also "reporting" folder
pipelines_to_remove = ["data_science", "data_processing"] + (["reporting"] if is_viz else [])
pipelines_path = current_dir / f"src/{python_package_name}/pipelines/"
for pipeline_subdir in pipelines_to_remove:
_remove_dir(pipeli... | Review this code and list any quality issues. | [
{
"issue": "you are removing version on the end, is it ok?",
"severity": "minor",
"line": 26
}
] | 1 |
python | return self._numba_apply(sliding_var, engine_kwargs, ddof=ddof)
window_func = partial(window_aggregations.roll_var, ddof=ddof)
return self._apply(
window_func,
name="var",
numeric_only=numeric_only,
)
def skew(self, numeric_only: bool = False):
wi... | Review this code and list any quality issues. | [] | 0 |
python | from .parquet import parquet
from .spark import spark
from .sql import sql # noqa F401
from .text import text
def _hash_python_lines(lines: List[str]) -> str:
filtered_lines = []
for line in lines:
line = re.sub(r"#.*", "", line) # remove comments
if line:
filtered_lines.append(l... | Review this code and list any quality issues. | [
{
"issue": "I think you can remove this\r\n\r\n```suggestion\r\n```\r\n\r\nThe packaged modules listed are are to be used with `load_dataset`. But I don't think we should recommend/implement something like\r\n```python\r\nload_dataset(\"spark\", df=df)\r\n```\r\nespecially given that `load_dataset` returns a di... | 1 |
python | context={"source": config_entries.SOURCE_SSDP},
data=data_entry_flow.BaseServiceInfo(),
)
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input={},
)
assert result["type"] == data_entry_flow.FlowResultType.FORM
assert result["step_id"] == "p... | Review this code and list any quality issues. | [
{
"issue": "Can we test a successful error lookup too?",
"severity": "minor",
"line": 26
}
] | 1 |
python | po_token_strs = self._configuration_arg('po_token', [], ie_key=YoutubeIE, casesense=True)
for token_str in po_token_strs:
po_token_client, sep, po_token = token_str.partition('+')
if not sep:
self.report_warning('Invalid po_token configuration format. Expected "client+po_... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n f'You may need to pass a Data Sync ID with --extractor-args \"youtube:data_sync_id=XXX\"')\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | sections: list[PEFileSection] = []
class ElfFileSectionHeader(BaseModel):
sh_name: str
sh_addr: int
class ElfFileSection(BaseModel):
header: ElfFileSectionHeader
"""
class ElfFileHeader(BaseModel):
file_class: str
endianness: str
file_type: str
architecture: str
architecture_human_... | Review this code and list any quality issues. | [
{
"issue": "incidentally, is this the correct way to set the default value, particularly as a list? i see this pattern used throughout the file.\r\n\r\nmy worry is that the default value `= []` uses the same instance of a mutable list, rather than copies of it. sorta like when you have a kwarg parameter `def fo... | 1 |
python | nxt_delim, pos = _next_delim(path)
token, path = (
path[: pos if pos != -1 else len(path)],
path[pos if pos != -1 else len(path) :],
)
if token == "":
return None # empty identifier is invalid
tokens.append((delim, token))
return tokens
def pars... | Review this code and list any quality issues. | [] | 0 |
python | display_id = self._match_id(url)
webpage = self._download_webpage(url, display_id)
iframe_url = self._search_regex(
r'<iframe[^>]+src=["\'](https?://app\.arkengine\.com/embed/[^"\']+)',
webpage, 'iframe URL')
video_id = self._search_regex(
r'embed/([a-zA-Z0-9... | Review this code and list any quality issues. | [
{
"issue": "`_parse_html5_media_entries` takes on most processing\r\n```suggestion\r\n return {\r\n 'id': display_id,\r\n **traverse_obj(webpage, {\r\n 'title': ({find_element(cls='section-header')}, {clean_html}),\r\n 'description': ({find_element(cls=... | 1 |
python | DATA_PARAMETER_PLACEHOLDER
**kwargs
All other keyword arguments are passed to `.Axes.fill_between`. The
following parameters additionally accept a sequence of values
corresponding to the *y* datasets:
*edgecolor(s)*, *facecolor(s)*, *linewidth(s)*, *linestyle(s)*.
... | Review this code and list any quality issues. | [
{
"issue": "Unsure whether to do this or to remove *hatch* from the named parameters.",
"severity": "minor",
"line": 26
}
] | 1 |
python | tokens.append(f"[name={self.name}]", style="underline")
return tokens
classes = _ClassesDescriptor()
"""CSS class names for this node."""
@property
def pseudo_classes(self) -> frozenset[str]:
"""A (frozen) set of all pseudo classes."""
return frozenset(self.get_pseudo_classes()... | Review this code and list any quality issues. | [] | 0 |
python | class BackgroundRectanglesExample(Scene):
def construct(self):
background= Rectangle().scale(3.2)
background.set_fill(opacity=.5)
background.set_color([TEAL, RED, YELLOW])
self.add(background)
m0 = Matrix([[12, -30], [-1, 15]],
... | Review this code and list any quality issues. | [
{
"issue": "it's not technically a VMobject but a class type, maybe typehint as ``typing.Type[MathTex]`` ?",
"severity": "minor",
"line": 26
}
] | 1 |
python | return series
def get_longest_back_rolling(self):
if self.N == 0:
return np.inf
return self.feature.get_longest_back_rolling() + self.N
def get_extended_window_size(self):
if self.N == 0:
get_module_logger(self.__class__.__name__).warning("The Ref(ATTR, 0) will ... | Review this code and list any quality issues. | [] | 0 |
python | ANIMATION_SPEED = 8.0
class Toggle(Widget):
def __init__(self, initial_state=False):
super().__init__()
self._state = initial_state
self._enabled = True
self._progress = 1.0 if initial_state else 0.0
self._target = self._progress
def set_rect(self, rect: rl.Rectangle):
self._rect = rl.Rec... | Review this code and list any quality issues. | [] | 0 |
python | """
if expr.is_number:
if expr.as_real_imag()[1]:
return False
return test_closed_group(expr, assumptions, Q.rational)
@RationalPredicate.register(Pow)
def _(expr, assumptions):
"""
* Rational ** Integer -> Rational
* Irrational ** Rational -> Irrational
* Rational **... | Review this code and list any quality issues. | [
{
"issue": "I think it would make more sense to check if the base was zero before checking it was rational. That way, if it was zero, you wouldn't need to waste time checking if it was rational.",
"severity": "minor",
"line": 26
}
] | 1 |
python | data_e_f = vector_store.search(
k=2,
return_tensors=["id", "text"],
filter=filter_fn,
)
assert len(data_e_f["text"]) == 1
assert (
sum([tensor in data_e_f.keys() for tensor in vector_store.dataset.tensors]) == 2
) # One for each return_tensors
assert len(data_e_f.key... | Review this code and list any quality issues. | [
{
"issue": "shouldn't you just change this to \"tensor_db\"?",
"severity": "minor",
"line": 26
}
] | 1 |
python | """A pyglet-based interactive 3D scene viewer."""
import copy
import os
import shutil
import sys
import time
import threading
from threading import Event, RLock, Semaphore, Thread
import imageio
import numpy as np
import OpenGL
from OpenGL.GL import *
import genesis as gs
from genesis.ext.pyrender.interaction.viewer... | Review this code and list any quality issues. | [
{
"issue": "But not for this one of course",
"severity": "minor",
"line": 17
}
] | 1 |
python | if (
self._paused_speech
and (timeout := self._session.options.false_interruption_timeout) is not None
):
# schedule a resume timer when user stops speaking
self._start_false_interruption_timer(timeout)
def on_vad_inference_done(self, ev: vad.VADEvent) -> Non... | Review this code and list any quality issues. | [
{
"issue": "I think the first condition makes sense, but the second may still cause the issue that the VAD interrupts stt committed speech?",
"severity": "minor",
"line": 26
}
] | 1 |
python | ``ctx``, to represent the :class:`.Context`.
"""
return True
@_cog_special_method
def bot_check(self, ctx: Context[BotT]) -> bool:
"""A special method that registers as a :meth:`.Bot.check`
check.
This function **can** be a coroutine and must take a sole parameter,
... | Review this code and list any quality issues. | [
{
"issue": "This PR is failing because `BotT` doesn't quite match `ClientT` so you'll have to use the latter.",
"severity": "critical",
"line": 26
}
] | 1 |
python | # SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from collections.abc import Set as AbstractSet
from dataclasses import replace
from itertools import product
from vllm.config import CUDAGraphMode, VllmConfig
from vllm.forward_context import BatchDescriptor
from... | Review this code and list any quality issues. | [
{
"issue": "This duplicates the list from `CUDAGraphMode.valid_runtime_modes` -- maybe we move this definition to `compilation.py` and update `valid_runtime_modes` to use that too so we have a single source of truth?\r\n\r\nI also think `valid_runtime_modes`, as written, should really be called `is_valid_runtim... | 1 |
python | import importlib
import os
import shutil
import sys
import unittest
from pathlib import Path
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
TEST_DATA_DIR = Path(os.path.dirname(os.path.abspath(__file__)), 'testdata')
sys.path.append(str(TEST_DATA_DIR))
importlib.invalidate_caches()
fr... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\nfrom yt_dlp import Config\r\nfrom yt_dlp.plugins import PACKAGE_NAME, directories, load_plugins\r\n```",
"severity": "minor",
"line": 13
}
] | 1 |
python | (?P<server>https?://{_INSTANCES_RE})/s/
(?P<id>[\w\-\.]+)'''
_TESTS = [
{
'url': 'https://ruhr-uni-bochum.sciebo.de/s/wWhqZzh9jTumVFN',
'info_dict': {
'id': 'wWhqZzh9jTumVFN',
'ext': 'mp4',
'title': 'CmvpJST.mp4',
}... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n title = hidden_inputs.get('filename')\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | batch = _examples_to_batch(examples)
if self.features:
# `IterableDataset` automatically fills missing columns with None.
# This is done with `_apply_feature_types_on_batch`.
batch = _apply_feature_types_on_batch(batch, self.features, token_per_repo_id=self._t... | Review this code and list any quality issues. | [
{
"issue": "Nit (to be aligned with the other docstring; also you forgot to add a blank space after `split` and before `(`):\r\n```suggestion\r\n split ([`NamedSplit`], defaults to `Split.TRAIN`)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | converted_model = self._converted(
graph, helper.make_operatorsetid("", from_opset), to_opset
)
assert len(converted_model.graph.node) == 2
assert converted_model.graph.node[0].op_type == "Constant"
assert converted_model.graph.node[1].op_type == "Upsample"
assert le... | Review this code and list any quality issues. | [] | 0 |
python | return False, status_key_occurrences
return True, None
def distance_transform_edt(
img: NdarrayOrTensor,
sampling: None | float | list[float] = None,
return_distances: bool = True,
return_indices: bool = False,
distances: NdarrayOrTensor | None = None,
indices: NdarrayOrTensor | None = Non... | Review this code and list any quality issues. | [
{
"issue": "And this should be (num_channels, H[, W [, D ]]) right? Since we only support up to 3D images.",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Issue an estimator specific warning when vcomp and mkl are both present
This method is called by `_check_mkl_vcomp`.
"""
def _check_mkl_vcomp(self, X, n_samples):
"""Check when vcomp and mkl are both present"""
# The BLAS call inside a prange in lloyd_iter_chunked_dense is known... | Review this code and list any quality issues. | [
{
"issue": "Let's call it `n_centroids` like in `_init_centroids`",
"severity": "minor",
"line": 26
}
] | 1 |
python | return TErr("StringMerger does NOT merge multiline strings.")
num_of_strings += 1
prefix = get_string_prefix(leaf.value)
if "r" in prefix:
return TErr("StringMerger does NOT merge raw strings.")
set_of_prefixes.add(prefix)
if id(leaf) in lin... | Review this code and list any quality issues. | [] | 0 |
python | },
(
{
CONF_RECOMMENDED: False,
CONF_PROMPT: "Speak like a pirate",
},
{
CONF_TEMPERATURE: 0.8,
CONF_CHAT_MODEL: "gpt-5",
CONF_TOP_P: 0.9,
C... | Review this code and list any quality issues. | [] | 0 |
python | 'withSuperFollowsTweetFields': True,
'withSuperFollowsUserFields': True,
'withV2Timeline': True,
'withVoice': True,
},
'features': {
'graphql_is_translatable_rweb_tweet_is_translatable_enabled': False,
'interactive_t... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n self.write_debug(f'Using GraphQL API (Auth = {self.is_logged_in})')\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | @staticmethod
def _decrypt_url_params(audio_info):
def char_code_at(s: str, n: int) -> int:
return ord(s[n]) if n < len(s) else 0
def decrypt(e: str, t: list) -> str:
r = list(range(256))
a = 0
s = ''
for o in range(256):
... | Review this code and list any quality issues. | [
{
"issue": "Can't we just iterate over the chars?\r\n```suggestion\r\n for char in key:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return torch.cat((cls_token.expand(inputs.shape[0], -1, -1), inputs), dim=1)
@basic_unit
class AbsPosEmbed(nn.Module):
""" Add absolute position embedding on patch embedding.
"""
def __init__(self, length: int, embed_dim: int):
super().__init__()
self.pos_embed = nn.Parameter(torch.zeros(1,... | Review this code and list any quality issues. | [] | 0 |
python | f"a key and a value separated by `:` or `=`."
)
key = items[0].strip()
if not key:
ctx.fail(
f"Invalid format of `{param.name}` option: Parameter key "
f"cannot be an empty string."
)
dot_list.append(item)
conf = OmegaConf.f... | Review this code and list any quality issues. | [
{
"issue": "This should be plural `load_versions` now right?\r\n```suggestion\r\n f\"Expected the form of 'load_versions' to be \"\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
from ..utils import (
int_or_none,
traverse_obj,
unified_timestamp,
url_or_none,
OnDemandPagedList,
)
class YappyIE(InfoExtractor):
_VALID_URL = r'https?://yappy\.media/video/(?P<id>\w+)'
_TESTS = [{
'url': 'https://yappy.media/video/47fea6d8586f48... | Review this code and list any quality issues. | [
{
"issue": "move `OnDemandPagedList` to the top of utils imports\r\nsort classes before functions, then sort alphabetically (or just use `isort`)",
"severity": "minor",
"line": 7
}
] | 1 |
python | 'upload_date': '20250323',
'episode': 'DEx 08x30 Rostros del mal: Los asesinos en serie que aterrorizaron España',
'duration': 11837,
'tags': ['españa', 'asesinos en serie', 'arropiero', 'historia criminal', 'mataviejas'],
},
}, {
'url': 'https://go.ivoox.com/rf/1... | Review this code and list any quality issues. | [
{
"issue": "2nd traversal is already branching and will return a `list` so we don't need `all`\r\n```suggestion\r\n download_paths = {\r\n traverse_obj(direct_download, ('data', 'downloadUrl', {str})),\r\n *traverse_obj(data, (('downloadUrl', 'mediaUrl'), {str})),\r\n }\r\n``... | 1 |
python | - ``target`` (long tensor): ``(N,)`` or ``(N, ...)`` (multioutput)
In the case of multioutput, as default the variances will be uniformly
averaged over the additional dimensions. Please see argument `multioutput`
for changing this behavior.
Args:
multioutput:
Defines aggregation in... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n If ``multioutput`` is not one of ``\"raw_values\"``, ``\"uniform_average\"`` or ``\"variance_weighted\"``.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from homeassistant.helpers.selector import (
NumberSelector,
NumberSelectorConfig,
NumberSelectorMode,
)
from homeassistant.helpers.update_coordinator import UpdateFailed
from .const import (
ATTR_LIMIT,
CONNECTIONS_COUNT,
CONNECTIONS_MAX,
DOMAIN,
SERVICE_FETCH_CONNECTIONS,
)
from .coor... | Review this code and list any quality issues. | [] | 0 |
python | error_var,
f"Sequence {name} is not available in Scenario {entity_id}.",
)
return
_GuiCoreContext.__assign_var(state, error_var, "")
except Exception as e:
_GuiCoreContext.__assign_var(st... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n f\"{'Sequence' if sequence else 'Scenario'} {sequence or scenario_id} is not submittable: \"\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license in https://github.com/pytorch/torchtune/blob/main/LICENSE
import logging
import torch
logger = logging.getLogger(__name__)
def is_torch_npu_available() -> bool:
"""Check the ... | Review this code and list any quality issues. | [
{
"issue": "Don't use global variable. Try add a function",
"severity": "minor",
"line": 26
}
] | 1 |
python | class SnowflakeCallersRightsConnection(SnowflakeConnection):
"""A caller's rights connection to Snowflake using the Snowflake Connector for Python.
This will only work when running on Snowpark Container Services or another
compatible platform.
See ``BaseSnowflakeConnection`` for complete docs.
"""... | Review this code and list any quality issues. | [
{
"issue": "Consider stripping whitespace from the token file contents in `_read_token_file`. Token files may contain trailing newlines or whitespace that could result in malformed authentication tokens when concatenated. Use `return token_file.read().strip()` to ensure clean token values.\n```suggestion\n ... | 1 |
python | class TestFixedQuad:
def test_scalar(self):
n = 4
expected = 1/(2*n)
got, _ = fixed_quad(lambda x: x**(2*n - 1), 0, 1, n=n)
# quadrature exact for this input
assert_allclose(got, expected, rtol=1e-12)
def test_vector(self):
n = 4
p = np.arange(1, 2*n)
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n x = np.arange(2**4+1)\r\n y = np.cos(0.2*x)\r\n val = romb(xp.asarray(y, dtype=xp.float64))\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | import json
import os
import random
import pandas as pd
# Read the CSV file into a pandas DataFrame. The CSV file was downloaded from Kaggle, and the source is linked in the README.
CURRENT_DIR = os.path.dirname(__file__) # Gets directory path of the current python module
df = pd.read_csv(os.path.join(CURRENT_DIR, ... | Review this code and list any quality issues. | [
{
"issue": "you can also do something like\r\n`df[\"Title\"].apply(lambda x: \"\".join(x.splitlines()).strip())`\r\nbut it's fine",
"severity": "minor",
"line": 21
}
] | 1 |
python | if mm_inputs:
pattern = "(<image>./</image>)"
image_sizes = mm_inputs["image_sizes"]
for index, message in enumerate(messages):
text = message["content"]
image_tags = re.findall(pattern, text)
text_chunks = text.split(pattern)
... | Review this code and list any quality issues. | [] | 0 |
python | myst_url_schemes = {
"https": None,
"http": None,
"mailto": None,
"client": {
"url": "/reference/ui/client/{{path}}.html#{{fragment}}",
"title": "{{path}}",
"classes": ["pre"],
},
"controller": {
"url": "/reference/ui/client/classes/controllers_{{path}}.{{path}}.h... | Review this code and list any quality issues. | [] | 0 |
python | for face in face_coords:
face_group.add(Polygon(*face, **self.faces_config))
return face_group
def update_faces(self, m):
face_coords = self.extract_face_coords()
new_faces = self.create_faces(face_coords)
self.faces.match_points(new_faces)
def extract_face_coords(s... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n edge_length\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if f.get('vcodec') != 'none' and not f.get('dynamic_range'):
f['dynamic_range'] = tag_dict.get('dynamic_range')
if f.get('acodec') != 'none' and not f.get('audio_channels'):
f['audio_channels'] = {
'stereo': 2,
'dolb... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'release_year': int_or_none(video_data.get('year')),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if backend != BACKEND_VIV:
logger.debug("skipping library code matching: only supported by the vivisect backend")
return []
if input_format != FORMAT_PE:
logger.debug("skipping library code matching: signatures only supports PE files")
return []
try:
if args.is_default_... | Review this code and list any quality issues. | [
{
"issue": "let's move this outside of the try block, otherwise looks great",
"severity": "major",
"line": 26
}
] | 1 |
python | (server_spans, client_spans, internal_spans) = partition_spans_by_kind(
client_traces
)
assert len(server_spans) == 11
assert len(client_spans) == 11
assert len(internal_spans) == 4
services = get_services(jaeger_port)
expected_services = [
'executor0/shard-0/rep-0',
'ex... | Review this code and list any quality issues. | [] | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.