language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | traverse_obj,
)
class FilmArchivIE(InfoExtractor):
IE_NAME = 'FILMARCHIV ON'
_VALID_URL = r'https?://(?:www\.)?filmarchiv\.at/de/filmarchiv-on/video/(?P<id>[0-9a-zA-Z_]+)'
_TESTS = [{
'url': 'https://www.filmarchiv.at/de/filmarchiv-on/video/f_0305p7xKrXUPBwoNE9x6mh',
'md5': '54a6596f6a8462... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'thumbnail': r're:https://cdn\\.filmarchiv\\.at/f_0306/vI3wO0tJIsfrqYFQXF_v1/poster\\.jpg',\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | for obj in queryset[:1]:
return obj
async def afirst(self):
return await sync_to_async(self.first)()
def last(self):
"""Return the last object of a query or None if no match is found."""
if self.ordered:
queryset = self.reverse()
else:
self._... | Review this code and list any quality issues. | [
{
"issue": "I agree with moving this check earlier, but what about after the TypeError for is_sliced? I don't think a sliced qs should sometimes succeed and sometimes fail.",
"severity": "critical",
"line": 26
}
] | 1 |
python | regex: Optional[str] = None
"""Regex to be used to pull out the value from the generated text."""
strip_whitespace: bool = True
"""Whether to strip whitespace from the value."""
added_prefix: Optional[str] = None
"""Prefix to be added to the value."""
added_suffix: Optional[str] = None
""... | Review this code and list any quality issues. | [] | 0 |
python | elif not docstring_started_empty:
docstring = " "
# We could enforce triple quotes at this point.
quote = quote_char * quote_len
# It's invalid to put closing single-character quotes on a new line.
if quote_len == 3:
# We need to find the... | Review this code and list any quality issues. | [
{
"issue": "This will need to be gated to the preview style (see #4164 for a recent example).",
"severity": "minor",
"line": 26
}
] | 1 |
python | BedrockModelName = str | LatestBedrockModelNames
"""Possible Bedrock model names.
Since Bedrock supports a variety of date-stamped models, we explicitly list the latest models but allow any name in the type hints.
See [the Bedrock docs](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html) for a ... | Review this code and list any quality issues. | [
{
"issue": "We don't need this flag if we always set it to `True`, right?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # f"removals: {len(new_gen.removals) if block_record.is_transaction_block else 0:2} "
# f"refs: {len(full_block.transactions_generator_ref_list):3} "
# f"tx: {block_record.is_transaction_block}")
last_timestamp = new_timestamp
... | Review this code and list any quality issues. | [
{
"issue": "This fixes tracking of previous *generators*",
"severity": "minor",
"line": 26
}
] | 1 |
python | def match(self, model_path: str):
return "guanaco" in model_path
def load_model(self, model_path: str, from_pretrained_kwargs: dict):
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
model = AutoModelForCausalLM.from_pretrained(
model_path, low_cpu_mem_usage... | Review this code and list any quality issues. | [
{
"issue": "this function can be removed.\r\n1. Set `use_fast_tokenizer = True` in your class, see https://github.com/lm-sys/FastChat/blob/4dfa5e1b212ce97b3d1bfbfc361c519ad890a250/fastchat/model/model_adapter.py#L370\r\n2. Then this function can be removed because it is the same as the function in the base clas... | 1 |
python | """Base implementation for Portainer container."""
def __init__(
self,
device_info: PortainerContainerData,
coordinator: PortainerCoordinator,
via_device: PortainerCoordinatorData,
) -> None:
"""Initialize a Portainer container."""
super().__init__(coordinator)
... | Review this code and list any quality issues. | [
{
"issue": "I don't think you need to change the identifiers of the containers, as that would need a migration (I think they were already present in `2026.2`).\n\nI think you only need to update the identifiers for the stacks (I think they are new in `2026.3`).",
"severity": "minor",
"line": 26
}
] | 1 |
python | ) from err
if map_content_trait.map_data is None:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="map_failure",
)
if (robot_position := map_content_trait.map_data.vacuum_position) is None:
raise HomeAssistantError(... | Review this code and list any quality issues. | [
{
"issue": "I'm not sure this is a good idea, other integrations instead just ignore segments from a different map than the current one.",
"severity": "minor",
"line": 26
}
] | 1 |
python | # http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing pe... | Review this code and list any quality issues. | [] | 0 |
python | console.print(" .env file content ".center(72, "="))
console.print(dot_env_file.read_text())
compose_version = None
try:
compose_version = docker.compose.version()
except DockerException:
pytest.fail("`docker compose` not available. Make sure compose plugin is installed")
try:
... | Review this code and list any quality issues. | [
{
"issue": "Oh, just a nit in static checks, can you fix?\n```suggestion\n health_status = api_request(\"GET\", path=\"monitor/health\").get(\"metadatabase\").get(\"status\")\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | import os
import re
import sys
from os import path
version = ''
# Centralize environment variables
JINA_VERSION = os.environ.get('JINA_VERSION')
SPHINX_MULTIVERSION_VERSION = os.environ.get('SPHINX_MULTIVERSION_VERSION', version)
sys.path.insert(0, path.abspath('..'))
project = 'Jina'
slug = re.sub(r'\W+', '-', proj... | Review this code and list any quality issues. | [
{
"issue": "this is not what is intended. See that `version` is used later, and thus this reading should be placed after the `version` var initialization",
"severity": "minor",
"line": 9
}
] | 1 |
python | """
extract ASCII and UTF-16 LE strings from file
"""
for s in capa.features.extractors.strings.extract_ascii_strings(buf):
yield String(s.s), FileOffsetAddress(s.offset)
for s in capa.features.extractors.strings.extract_unicode_strings(buf):
yield String(s.s), FileOffsetAddress(s.offse... | Review this code and list any quality issues. | [] | 0 |
python | modes.add_argument("-h", "--help", action="help",
help="show this help and exit")
selopts = parser.add_argument_group("voice selection")
selmodes = selopts.add_mutually_exclusive_group()
selmodes.add_argument("-n", "--name",
default="Arnold",
help="get a voice object by name (default: Arnold)")
selmodes.ad... | Review this code and list any quality issues. | [] | 0 |
python | MODEL = "microsoft/Phi-tiny-MoE-instruct"
def _run_vllm(vllm_runner):
with vllm_runner(
MODEL,
trust_remote_code=False,
max_model_len=256,
max_num_batched_tokens=1024,
load_format="dummy",
compilation_config=CompilationConfig(
mode=CompilationMode.VLLM_C... | Review this code and list any quality issues. | [
{
"issue": "I think we already have a fixture for this",
"severity": "minor",
"line": 26
}
] | 1 |
python | sep_style=None,
sep=None,
)
)
# BiLLa default template
register_conv_template(
Conversation(
name="billa",
system="",
roles=("Human", "Assistant"),
messages=(),
offset=0,
sep_style=SeparatorStyle.BILLA,
sep="\n",
stop_str="Human:",
)
)... | Review this code and list any quality issues. | [
{
"issue": "Please try to strictly follow https://github.com/nomic-ai/gpt4all/blob/d4861030b778da6db59d21d2927a4aba4f9f1f43/gpt4all-bindings/python/gpt4all/gpt4all.py#L232.\r\n\r\nFor example, they use \"### Instruction\"/\"### Response\" instead of \"user\" / \"assistant\"\r\n\r\nYou can use `python3 -m fastch... | 1 |
python | if self.query.extra_order_by or self.query.order_by:
return True
elif (
self.query.default_ordering
and self.query.get_meta().ordering
and
# A default ordering doesn't affect GROUP BY queries.
not self.query.group_by
):
... | Review this code and list any quality issues. | [
{
"issue": "Sorry, on second look I think this logic is already covered by the call to `if not self.ordered`, so we can just remove this.\n```suggestion\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | if specified.
Returns:
The override value if specified, or `None`.
"""
_ENV_VAR_NAME = "OUMI_USE_SPOT_VM"
s = os.environ.get(_ENV_VAR_NAME, "")
mode = s.lower().replace("-", "").replace("_", "").strip()
if not mode or mode in ("config",):
return None
bool_result = try_str_to... | Review this code and list any quality issues. | [
{
"issue": "Could you add a logging line here to help verify the override worked?",
"severity": "minor",
"line": 26
}
] | 1 |
python | R_np, R_recon, rtol=1e-5, atol=1e-6, err_msg=f"NumPy round-trip failed for batch size {batch_size}"
)
@pytest.mark.parametrize("batch_size", [0, 1, 100])
@pytest.mark.parametrize("func", ["T", "R"])
def test_torch_identity_transform(batch_size, func):
if batch_size == 0:
pos = torch.randn(3)
b... | Review this code and list any quality issues. | [
{
"issue": "You don't need `.numpy()` I think.",
"severity": "minor",
"line": 26
}
] | 1 |
python | SupportedModels.LOCK,
SupportedModels.LOCK_PRO,
SupportedModels.LOCK_ULTRA,
):
options.update(
{
vol.Optional(
CONF_LOCK_NIGHTLATCH,
default=self.config_entry.options.get(
... | Review this code and list any quality issues. | [
{
"issue": "Consider using a number selector here so we can configure the interface to be a box or a slider depending on what's most appropriate.\n\nhttps://github.com/home-assistant/core/blob/60014b6530fd1b5d6d0849de7ad4050a89eed329/homeassistant/helpers/selector.py#L1121\n\nI'm not sure what the frontend does... | 1 |
python | """Diagnostics support for Liebherr."""
from __future__ import annotations
from dataclasses import asdict
from typing import Any
from homeassistant.components.diagnostics import async_redact_data
from homeassistant.const import CONF_API_KEY
from homeassistant.core import HomeAssistant
from .coordinator import Liebh... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n \"last_update_success\": coordinator.last_update_success,\n```",
"severity": "minor",
"line": 24
}
] | 1 |
python | """Create a mocked Green Planet Energy API."""
with patch(
"homeassistant.components.green_planet_energy.async_setup_entry",
return_value=True,
) as mock_setup_entry:
yield mock_setup_entry
@pytest.fixture
def mock_api() -> Generator[MagicMock]:
"""Create a mocked Green Planet Ener... | Review this code and list any quality issues. | [] | 0 |
python | api_key = prompt_api_key(
step_counter,
custom_model.split('/')[0] if len(custom_model.split('/')) > 1 else '',
self.conversation.state.agent.llm.api_key if self.conversation else None,
escapable=escapable,
)
memory_condensation = c... | Review this code and list any quality issues. | [
{
"issue": "@OpenHands please replace all extra_body argument to LLM class with `litellm_extra_body`",
"severity": "minor",
"line": 26
}
] | 1 |
python | import asyncio
from os import path
from uuid import UUID
import lancedb
from pydantic import BaseModel
from lancedb.pydantic import LanceModel, Vector
from typing import Generic, List, Optional, TypeVar, Union, get_args, get_origin, get_type_hints
from cognee.infrastructure.databases.exceptions import MissingQueryPara... | Review this code and list any quality issues. | [
{
"issue": "I am not sure, removing this unified datapoint is a good idea. The new approach can be a bit confusing especially if a datapoint have multiple properties to embed.",
"severity": "minor",
"line": 22
}
] | 1 |
python | data={
'open': [15.0],
'high': [17.0],
'low': [11.0],
'close': [15.0],
'volume': [100.0]
},
index=[minute])
self.writer.write_sid(sids[0], data)
data = DataFrame(
data={
'... | Review this code and list any quality issues. | [] | 0 |
python | )
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
NextMediaIE,
NextMediaActionNewsIE,
AppleDailyIE,
NextTVIE,
)
from .nexx import (
NexxIE,
NexxEmbedIE,
)
from .nfb import (
NFBIE,
NFBSeriesIE,
)
from .nfhsnetwork import NFHSNetworkIE
from .nfl impo... | Review this code and list any quality issues. | [] | 0 |
python | # coding: utf-8
from __future__ import unicode_literals
import base64
import time
import uuid
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_str,
)
from ..utils import (
ExtractorError,
int_or_none,
)
class MGTVIE(InfoExtractor):
_VALID_URL = r'https?://(?:w(?:... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n for sub in try_get(info, lambda x: x['data']['title']) or []:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | Args:
browser_type: The type of browser to launch ('chromium', 'firefox', or 'webkit').
browser_launch_options: Keyword arguments to pass to the browser launch method. These options are provided
directly to Playwright's `browser_type.launch` method. For more details, refer to the... | Review this code and list any quality issues. | [
{
"issue": "The `use_incognito_pages` option should not be included in the `browser_launch_options`. This parameter is intended for browser launch options supported by Playwright ([docs](https://playwright.dev/python/docs/api/class-browsertype#browser-type-launch)).\r\n\r\nThe `use_incognito_pages` is our custo... | 1 |
python | expected_shape = f"({n}, H, W)"
actual_shape = str(getattr(mask, "shape", None))
actual_dtype = getattr(mask, "dtype", None)
is_valid_shape = (
isinstance(mask, np.ndarray) and len(mask.shape) == 3 and mask.shape[0] == n
)
if not is_valid_shape:
raise ValueError(
"mask m... | Review this code and list any quality issues. | [
{
"issue": "The deprecation warning only warns users about non-bool masks but does not fix the performance issue described in the PR. According to the PR description, the actual fix should be in MaskAnnotator where masks are converted to bool before being used as array indices (line 418-419 in src/supervision/a... | 1 |
python | limit: int | None = None,
dag_id: str | None = None,
) -> DAGRunCollectionResponse | ServerResponseError:
"""
List all dag runs.
Args:
start_date: Filter dag runs by start date (optional)
end_date: Filter dag runs by end date (optional)
state: Fil... | Review this code and list any quality issues. | [
{
"issue": "Could we implement this as - \n- \n ```\n if dag_id == None:\n dag_id = \"~\"\n params = {\n \"start_date\": start_date,\n \"end_date\": end_date,\n \"state\": state,\n \"limit\": limit,\n \"dag_id\": dag_id,\n }\n```... | 1 |
python | ... ax_inset.plot(osm, osr, 'c.', osm, slope*osm + intercept, 'k-')
... ax_inset.set_xticklabels([])
... ax_inset.set_yticklabels([])
... ax_inset.set_title(r'$\lambda=%1.2f$' % lmbda)
>>> plt.show()
"""
# _axis_nan_policy decorator does not currently support these for lazy arr... | Review this code and list any quality issues. | [
{
"issue": "Great that you found `xp_result_type` - but why not `xp_promote` both `lmb` and `data`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import torch.nn as nn
from torch.nn.modules.loss import _Loss
def complex_diff_abs_loss(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
"""
First compute the difference in the complex domain,
then get the absolute value and take the mse
Args:
x, y - B, 2, H, W real valued tensors represent... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if not x.is_complex():\r\n x = torch.view_as_complex(x.permute(0, 2, 3, 1).contiguous())\r\n if not y.is_complex():\r\n y = torch.view_as_complex(y.permute(0, 2, 3, 1).contiguous())\r\n \r\n diff = torch.abs(x - y)\r\n return nn.functional.mse_loss(... | 1 |
python | },
'params': {
'skip_download': True,
},
}, {
'url': 'http://www.douyu.com/xiaocang',
'only_matching': True,
}, {
# \"room_id\"
'url': 'http://www.douyu.com/t/lpl',
'only_matching': True,
}]
def _real_extract(self, url):
video_... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n auth = md5(f'room/{video_id}?aid=wp&client_sys=wp&time={tt}zNzMV1y4EMxOHS6I5WKm'.encode()).hexdigest()\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | # This example shows how to use vector config to use QDRANT CLOUD
import os
from dotenv import load_dotenv
from mem0 import Memory
# Loading my API_KEY for OPENAI
load_dotenv()
OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY')
USER_ID = "test"
os.environ['OPENAI_API_KEY'] = OPENAI_API_KEY
quadrant_host="xx.gcp.cloud.q... | Review this code and list any quality issues. | [
{
"issue": "Here you can write like `Loading OpenAI API Key`",
"severity": "minor",
"line": 6
}
] | 1 |
python | # Get more time to the robot to reach the last waypoint
for i in range(100):
scene.step()
# reach
qpos = franka.inverse_kinematics(
link=end_effector,
pos=np.array([0.65, 0.0, 0.13]),
quat=np.array([0, 1, 0, 0]),
)
franka.control_dofs_position(qpos[:-2], motors_dof)
... | Review this code and list any quality issues. | [] | 0 |
python | magic_trailing_comma=not skip_magic_trailing_comma,
experimental_string_processing=experimental_string_processing,
)
if config and verbose:
out(f"Using configuration from {config}.", bold=False, fg="blue")
if code is not None:
then = datetime.utcnow()
try:
format... | Review this code and list any quality issues. | [
{
"issue": "Are you sure `--color` works on windows? I would've assumed `wrap_stream_for_windows` would be necessary here. \r\n\r\nExample:\r\n\r\nhttps://github.com/psf/black/blob/754eecf69eed0bdc75fe224c19a702a4f0676807/src/black/__init__.py#L698-L716",
"severity": "minor",
"line": 26
}
] | 1 |
python | if last < len(sentence):
tail = sentence[last:]
if tail:
parts.append(tail)
return parts
def _convert_sml(self, sml:str)->tuple[bool, str]:
m = SML_TAG_PATTERN.fullmatch(sml)
if not m:
error = '_convert_sml SML_TAG_PATTERN error: m is empt... | Review this code and list any quality issues. | [
{
"issue": "After adding the error handling for _set_voice(), the code should return early to avoid executing the subsequent lines (446-452) which are meant to handle the opening voice tag, not the closing tag. The assertion on line 446 expects a value, which closing tags don't have. Add 'return True, \"\"' aft... | 1 |
python | # SAVEPOINTs. An orphan SAVEPOINT (created but never released) causes
# all subsequent SAVEPOINTs to nest inside it, making every RELEASE a
# merge instead of a commit — trapping data in an uncommitted
# transaction invisible to reader connections.
#
# aiosqlite queues SQL synchr... | Review this code and list any quality issues. | [
{
"issue": "it might be worth pointing out that there is still a failure case we can't handle, when the call to `ROLLBACK TO` is itself cancelled. The only thing we can do is to run it multiple times and hope for the best. Same thing with `RELEASE`",
"severity": "critical",
"line": 26
}
] | 1 |
python | def copy(self) -> "Mobject":
"""Create and return an identical copy of the Mobject including all submobjects.
Returns
-------
:class:`Mobject`
The copy.
Note
----
The clone is initially not visible in the Scene, even if the original was.
"""
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n def update(self, dt: fload=0, recursive: bool=True) -> \"Mobject\":\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.random_state = random_state
@_fit_context(prefer_skip_nested_validation=True)
def fit(self, X, y, **params):
"""Fit the :class:`TargetEncoder` to X and y.
It is discouraged to use this method because it can introduce data leakage.
Use `fit_transform` on training data instead.
... | Review this code and list any quality issues. | [
{
"issue": "we don't need this, unless, something breaks in a pipeline or a metaestimator calling `fit.transform` instead of `fit_transform`, but I think that already breaks since the two are not equivalent anyway.",
"severity": "minor",
"line": 26
}
] | 1 |
python | self,
vocab_size=30522,
type_vocab_size=2,
modality_type_vocab_size=2,
max_position_embeddings=40,
hidden_size=768,
num_hidden_layers=12,
num_attention_heads=12,
intermediate_size=3072,
hidden_act="gelu",
hidden_dropout_prob=0.0,
at... | Review this code and list any quality issues. | [
{
"issue": "vilt doesn't force `True`, we need to revert this file",
"severity": "minor",
"line": 26
}
] | 1 |
python | bundle: The new `RefBundle` to unify with the old schema.
warn: Raise a warning if the schemas diverge.
enforce_schemas: If `True`, allow the schemas to diverge and return unified schema.
If `False`, but keep the old schema.
Returns:
A ref bundle with the unified schema of the t... | Review this code and list any quality issues. | [
{
"issue": "update type annotation to be optional?",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.cmd_opts.add_option(
"--user",
dest="user",
action="store_true",
default=False,
help="Only output packages installed in user-site.",
)
self.cmd_opts.add_option(cmdoptions.list_path())
self.cmd_opts.add_option(
"--all",
... | Review this code and list any quality issues. | [
{
"issue": "Just a minor note, it’d be a good idea to add some sorting here so the order package appear is more stable. But honestly nobody cares that much about these help messages anyway so it’s fine to keep things as-is.",
"severity": "minor",
"line": 26
}
] | 1 |
python | Search query: {query}
Document chunk: {document}
Which class best represents the relevance?
""",
},
],
temperature=self.temperature,
n=self.n,
logprobs=self.logprobs,
top_logprobs=self.to... | Review this code and list any quality issues. | [
{
"issue": "The logic assumes the first valid class token found is the correct one. Consider adding validation to ensure only one class token exists in the response or handle cases where multiple class tokens are present.",
"severity": "minor",
"line": 26
}
] | 1 |
python | ) -> Self | None:
"""Find type information for a matching DP code available for this device."""
if dpcodes is None:
return None
if not isinstance(dpcodes, tuple):
dpcodes = (dpcodes,)
lookup_tuple = (
(device.function, device.status_range)
... | Review this code and list any quality issues. | [
{
"issue": "According to the SDK, the attribute can be a string, or it can be None, but it is always present\r\nhttps://github.com/tuya/tuya-device-sharing-sdk/blob/f635d83b837c45948af6cab77e45dd85e851253d/tuya_sharing/device.py#L44\r\n\r\n```suggestion\r\n report_type=current_definit... | 1 |
python | full_node_1, _server_1, bt = one_node_one_block
blocks = await full_node_1.get_all_full_blocks()
start_height = blocks[-1].height if len(blocks) > 0 else -1
blocks = bt.get_consecutive_blocks(
3,
block_list_input=blocks,
guarantee_transaction_block=True,
... | Review this code and list any quality issues. | [
{
"issue": "The `ack.status` value should stay exactly as it was, AFAICS:\r\n```suggestion\r\n assert ack.status == MempoolInclusionStatus.FAILED.value\r\n assert \"chia.util.errors.ValidationError: Error code: BAD_AGGREGATE_SIGNATURE\" in caplog.text\r\n```",
"severity": "critical",
"line... | 1 |
python | mode: Name of the mode.
Returns:
An optionally awaitable object which can be awaited until the screen
associated with the mode has been mounted.
"""
stack = self._screen_stacks.get(mode, [])
if stack:
await_mount = AwaitMount(stack[0], [])
el... | Review this code and list any quality issues. | [] | 0 |
python | if is_relative_path(pattern):
pattern = xjoin(base_path, pattern)
elif is_local_path(pattern):
base_path = os.path.splitdrive(pattern)[0] + os.sep
else:
base_path = ""
pattern, storage_options = _prepare_path_and_storage_options(pattern, download_config=download_config)
fs, _, _ ... | Review this code and list any quality issues. | [] | 0 |
python | def cleanup(self):
os.remove(self.hosts_path)
def is_alive(self):
if not super().is_alive():
return False
try:
conn = HTTPConnection(self.host, self.port)
conn.request("GET", "/status")
res = conn.getresponse()
except Exception:
... | Review this code and list any quality issues. | [
{
"issue": "do we perhaps want a timeout here after a couple of tries?",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'title': 'Mishal K. on LinkedIn: #sendinblueviews #toronto #digitalmarketing',
'description': 'md5:be125430bab1c574f16aeb186a4d5b19',
'creator': 'Mishal K.'
},
}]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, v... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n formats = [{\r\n 'url': source['src'],\r\n 'ext': mimetype2ext(source.get('type')),\r\n 'tbr': float_or_none(source.get('data-bitrate'), scale=1000),\r\n } for source in sources]\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'view_count': view_count,
})
yield info
page_info = media.get('page_info')
if not page_info or not isinstance(page_info, dict):
break
has_next_page = page_info.get('has_next_page')
if not has_next_page:
br... | Review this code and list any quality issues. | [
{
"issue": "The point was not to have a _real_extract/_VALID_URL/TESTS that needs to be overloaded in subclasses\r\n\r\n```py\r\n\r\n\r\nclass InstagramPlayListBaseIE(InstagramBaseIE):\r\n def _real_extract(self, url):\r\n ...\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | def test_solve_Piecewise():
assert [S(10)/3] == solve(3*Piecewise(
(S.NaN, x <= 0),
(20*x - 3*(x - 6)**2/2 - 176, (x >= 0) & (x >= 2) & (x>= 4) & (x >= 6) & (x < 10)),
(100 - 26*x, (x >= 0) & (x >= 2) & (x >= 4) & (x < 10)),
(16*x - 3*(x - 6)**2/2 - 176, (x >= 2) & (x >= 4) & (x >= 6... | Review this code and list any quality issues. | [
{
"issue": "Does this only work with real variables? What happens otherwise?",
"severity": "minor",
"line": 26
}
] | 1 |
python | helper = importlib.import_module(f"homeassistant.helpers.{helper_name}")
wrapped = ModuleWrapper(self._hass, helper)
setattr(self, helper_name, wrapped)
return wrapped
def bind_hass(func: _CallableT) -> _CallableT:
"""Decorate function to indicate that first argument is hass.
The use ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \"\"\"Recursively get component dependencies.\"\"\"\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Create ContentUpdateSchema object from form data
update_data = ContentUpdateSchema(
name=name if name and name.strip() else None,
description=description if description and description.strip() else None,
metadata=parsed_metadata,
reader_id=reader_id if reader_id... | Review this code and list any quality issues. | [
{
"issue": "Should be able to always use the async, as it should work with non-async DBs as well",
"severity": "minor",
"line": 26
}
] | 1 |
python | def test_from_polars_save_to_disk_and_load_from_disk_round_trip_with_large_list(tmp_path):
import polars as pl
df = pl.from_dict({"col_1": [[1, 2], [3, 4]]})
ds = Dataset.from_polars(df)
dataset_path = tmp_path / "dataset_dir"
ds.save_to_disk(dataset_path)
assert (dataset_path / "data-00000-of-... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \r\ndef test_add_column():\r\n from datasets import Dataset\r\n ds = Dataset.from_dict({\"a\": [1, 2]})\r\n ds = ds.add_column(\"b\", [3, 4])\r\n assert \"b\" in ds.features\r\n assert ds[0] == {\"a\": 1, \"b\": 3}\r\n assert ds[1] == {\"a\": 2, \"b\": 4}\r\n``... | 1 |
python | self.play(LaggedStart(
dot1.animate.shift(RIGHT * 4),
dot2.animate.shift(RIGHT * 4),
dot3.animate.shift(RIGHT * 4),
lag_ratio=0.25,
run_time=4
))
"""
def __init__(
self,
*animatio... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n :class:`~.Animation` to apply to mobject.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | class P2PSeedNodes(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.disable_autoconnect = False
def test_no_seednode(self):
# Check that if no seednode is provided, the node proceeds as usual (without waiting)
with self.nodes[0].assert_debug_log(expected... | Review this code and list any quality issues. | [
{
"issue": "Had to bump the timeout 20 -> 30 seconds for the test to pass. Example commit with extra logging: 46bac29032c0148ce5288faadbcdc3961d522060",
"severity": "minor",
"line": 26
}
] | 1 |
python | output = net(test_data, **extra_forward_args_)
if output.shape[1] != output_channels:
raise ValueError(f"output channel number `{output.shape[1]}` doesn't match: `{output_channels}`.")
if output.dtype != output_dtype:
raise ValueError(f"dtype of output data `{output.dtype}` doesn... | Review this code and list any quality issues. | [
{
"issue": "Here you could state the callable accepts the network to save, the path to save to, and a dictionary of extra JSON files (name -> contents) to include with this.",
"severity": "minor",
"line": 26
}
] | 1 |
python | if isinstance(node_dict, int):
node_dict = hex(node_dict)
if isinstance(node_dict, str):
return node_dict
if "description" in node_dict:
return node_dict.get("description")
else:
return self.recurse_node(node_dict.get(node_dict.get("type")))
... | Review this code and list any quality issues. | [
{
"issue": "Let's move this to a helper function located near the top of this file.",
"severity": "major",
"line": 26
}
] | 1 |
python | )
# Ensure we are building a new query every time.
def get_q() -> pl.LazyFrame:
return pl.scan_parquet(
"s3://.../...",
storage_options={
"aws_profile": "A",
"aws_endpoint_url": "http://localhost",
},
... | Review this code and list any quality issues. | [] | 0 |
python | 'format_id': 'name',
'format_note': 'label',
'width': 'width',
'height': 'height',
}),
**parse_codecs(quality.get('codecs')),
'url': url,
'ext': determine_ext(url.parti... | Review this code and list any quality issues. | [
{
"issue": "maybe use `format_field(traverse_obj(...), template='https://...')`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Some values are stringified JSON arrays
for key in ('video_servers', 'subtitles'):
if key in m3u8_dict:
m3u8_dict[key] = self._parse_json(m3u8_dict[key], None, fatal=False) or []
return m3u8_dict
def _parse_m3u8_vod_duration(self, m3u8_vod, video_id):
# Slides... | Review this code and list any quality issues. | [
{
"issue": "Is this useful enough to move to `extractor/common.py` to be with `_extract_m3u8_vod_duration`? If not, I can simplify it for this single use case",
"severity": "major",
"line": 26
}
] | 1 |
python | blocking=True,
return_response=True,
)
await hass.async_block_till_done()
assert response["connections"] is not None
await hass.config_entries.async_unload(config_entry.entry_id)
await hass.async_block_till_done()
with pytest.raises(
ServiceValid... | Review this code and list any quality issues. | [
{
"issue": "Same as above: matching the raised exception string against the translation key relies on translations *not* being cached. To make the test resilient, capture the exception (`as err`) and assert on `err.value.translation_key == \"service_config_entry_not_found\"` (and/or placeholders) instead of `ma... | 1 |
python | try:
span.set_attributes(
{
"framework": "promptflow",
"span_type": trace.type.value,
"function": trace.function,
}
)
node_name = get_node_name_from_context()
if node_name:
span.set_attribute("node_name",... | Review this code and list any quality issues. | [
{
"issue": "what could be in the missing else branch here?",
"severity": "minor",
"line": 26
}
] | 1 |
python | stupid_format_method_bug = (
"Some really long string that just so happens to be the {} {} to force the 'format'"
" method to hang over the line length boundary. This is pretty annoying.".format(
"perfect", "length"
)
)
class A:
def foo():
os.system(
"This is a regression t... | Review this code and list any quality issues. | [] | 0 |
python | "domain": DOMAIN,
"integration_title": INTEGRATION_TITLE,
},
)
async def async_setup_entry(
hass: HomeAssistant, entry: WaterFurnaceConfigEntry
) -> bool:
"""Set up WaterFurnace from a config entry."""
username = entry.data[CONF_USERNAME]
password = entry.data[CONF_PASSWORD]
... | Review this code and list any quality issues. | [
{
"issue": "You _could_ move this to `_async_setup` in the coordinator",
"severity": "major",
"line": 26
}
] | 1 |
python | self._total_pages_count = 0
self._pages = WeakValueDictionary[str, CrawleePage]() # Track the pages in the pool
self._plugins_cycle = itertools.cycle(self._plugins) # Cycle through the plugins
# Flag to indicate the context state.
self._active = False
@classmethod
def with_de... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n user_data_dir: Path to a user data directory, which stores browser session data like cookies\r\n and local storage.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | h.update(nonce)
tmp = h.digest()
def mix_tmp(count):
nonlocal tmp
for i in range(count):
mix_once(tmp)
def mix_twist(nonce):
nonlocal tmp
mix_once(base64.urlsafe_b64encode(tmp).rstrip(b'=') + nonce)
mix_once(cls._SECR... | Review this code and list any quality issues. | [
{
"issue": "Why not just move the opener also up here?\r\n\r\n```suggestion\r\n AbemaTVBaseIE._DEVICE_ID = str(uuid.uuid4())\r\n add_opener(self._downloader, AbemaLicenseHandler(self))\r\n\r\n username, _ = self._get_login_info()\r\n AbemaTVBaseIE._USERTOKEN = username and self.cache... | 1 |
python | if self.type_information.min <= new_value <= self.type_information.max:
return new_value
# Guarded by number validation
# Safety net in case of future changes
raise ValueError(
f"Value `{new_value}` (converted from `{value}`) out of range:"
f" ({self.type_info... | Review this code and list any quality issues. | [
{
"issue": "Can we not move this to `DPCodeIntegerWrapper`?\r\n```python\r\n if type_information.report_type in {\"sum\", \"minux\"}:\r\n self.state_class = SensorStateClass.TOTAL_INCREASING\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | resample = functools.partial(mpl._image.resample, transform=Affine2D())
with pytest.raises(TypeError, match="incompatible function arguments"):
resample(np.zeros((9, 9)), None)
with pytest.raises(ValueError, match="different dimensionalities"):
resample(np.zeros((9, 9)), np.zeros((9, 9, 4)))
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n [(np.array([[0.1, 0.3, 0.2]]), mimage.NEAREST,\r\n np.array([[0.1, 0.1, 0.1, 0.3, 0.3, 0.3, 0.3, 0.2, 0.2, 0.2]])),\r\n (np.array([[0.1, 0.3, 0.2]]), mimage.BILINEAR,\r\n```\r\n\r\nThese values are implemented in a private namespace, but are available in a public namesp... | 1 |
python | # Iterate through the typedef table to resolve the nested name
table_row = get_dotnet_table_row(pe, dnfile.mdtable.TypeDef.number, nested_class_table[index])
if table_row is None:
return typedef.TypeNamespace, tuple(typedef_name[::-1])
name = table_row.TypeName
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n) -> Tuple[str, Tuple[str, ...]]:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert_type(MAR_f4.ptp(None, MAR_subclass), MaskedNDArraySubclass)
assert_type(MAR_b.argmin(), np.intp)
assert_type(MAR_f4.argmin(), np.intp)
assert_type(MAR_f4.argmax(fill_value=6.28318, keepdims=False), np.intp)
assert_type(MAR_b.argmin(axis=0), Any)
assert_type(MAR_f4.argmin(axis=0), Any)
assert_type(MAR_b.argmin(k... | Review this code and list any quality issues. | [] | 0 |
python | of the conv operators. Then it will prune low contribution filters depends on the global information.
So if sparsity of conv operator is 0.4, the expected masks should mask out filter 0 and filter 1 together,
this can be verified through:
`all(torch.sum(mask1['weight_mask'], (1, 2, 3)).numpy()... | Review this code and list any quality issues. | [] | 0 |
python | inverse_sqrt_with_warmup = "inverse_sqrt_with_warmup"
max_scheduler = "max_scheduler"
constant = "constant"
@dataclass
class SchedulerConfig(BaseConfig):
name: SchedulerType = SchedulerType.cosine_with_warmup
t_warmup: int = 100
t_max: Optional[int] = None
alpha_f: float = 0.1
grad_clip_w... | Review this code and list any quality issues. | [] | 0 |
python | '_type': 'url_transparent',
'url': m3u8_url,
'id': episode_id,
**traverse_obj(episode, {
'title': ('episodeName', {str_or_none}),
'thumbnail': ('episodeThumb', {url_or_none}),
... | Review this code and list any quality issues. | [
{
"issue": "We don't want to be compiling the entire entries in advance. Instead, this should use a generator so that features such as `--lazy-playlist` work.",
"severity": "minor",
"line": 26
}
] | 1 |
python | )
yield uvm_factory
# if the test failed, save important files from the root of the uVM into `test_results` for troubleshooting
report = request.node.stash[PHASE_REPORT_KEY]
if "call" in report and report["call"].failed:
for uvm in uvm_factory.vms:
# This is best effort. We want to ... | Review this code and list any quality issues. | [
{
"issue": "shouldn't this be `/firecracker/build/current_artifacts`? Why can't we use the constants defined in `defs`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | backend="sql_default",
table_name="openai_conversations",
),
description="Conversations store configuration (uses SQL backend)",
)
responses: ResponsesStoreReference | None = Field(
default=None,
description="Responses store configuration (uses SQL backend)",
)
... | Review this code and list any quality issues. | [
{
"issue": "right now the `default_factory` path uses `os.environ.get(\"SQLITE_STORE_DIR\")` directly. `replace_env_vars()` expands `~` via `os.path.expanduser()`, but the kvstore path doesn’t, and `SqliteKVStoreImpl` will happily `os.makedirs()` whatever dirname it sees.\n\ncan we wrap the env var in `os.path.... | 1 |
python | if key not in myfunction.calls:
myfunction.calls[key] = 0
myfunction.calls[key] += 1
if myfunction.calls[key] == 1:
return value
else:
return '%s called %s times' % (value, myfunction.calls[key])
myfunction.calls = dict()
... | Review this code and list any quality issues. | [] | 0 |
python | name (str): Name of the collection.
embedding_model_dims (int, optional): Dimension of the embedding vector.
"""
self.cur.execute(f"""
CREATE TABLE IF NOT EXISTS {name} (
id UUID PRIMARY KEY,
vector vector({embedding_model_dims}),
p... | Review this code and list any quality issues. | [
{
"issue": "Can you please elaborate why we need this?",
"severity": "minor",
"line": 26
}
] | 1 |
python | "transformer.decoder_layer.{bid}.router", # Grok
"transformer.blocks.{bid}.ffn.router.layer", # dbrx
"model.layers.{bid}.block_sparse_moe.router.layer", # granitemoe
"model.layers.{bid}.feed_forward.router", # llama4 jamba
"encoder.layers.{bid}.... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \"backbone.layers.{bid}.mixer.gate.e_score_correction\" # nemotron-h-moe\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | "output_type": "pt",
}
return inputs
def test_inference(self):
device = "cpu"
components = self.get_dummy_components()
pipe = self.pipeline_class(**components)
pipe.to(device)
pipe.set_progress_bar_config(disable=None)
inputs = self.get_dummy_inputs... | Review this code and list any quality issues. | [] | 0 |
python | pub_key = req.text
# Step 3: Get the payload
payload = jwt.decode(encoded_auth_jwt, pub_key, algorithms=["ES256"])
email = payload.get(
config.get("get_user_by_aws_alb_auth_settings.jwt_email_key", "email")
)
if not email:
raise UnableToAuthenticate("Unable to determine user from ID... | Review this code and list any quality issues. | [
{
"issue": "I would recommend adding this to a log. Otherwise, people will be scratching their heads trying to figure out what's going on.",
"severity": "minor",
"line": 26
}
] | 1 |
python | kind: _SortKind | None = None,
order: str | Sequence[str] | None = None,
endwith: bool | None = True,
fill_value: _ScalarLike_co | None = None,
*,
stable: Literal[False] | None = False,
) -> NDArray[Any]: ...
@overload
def compressed(x: _ArrayLike[_ScalarT_co]) -> _Array1D[_ScalarT_co]: ...
@overloa... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\ndef choose(indices, choices, out=None, mode=\"raise\"): ...\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | fields = (
block.input_schema.get_fields()
if block.block_type not in [BlockType.AGENT]
else vals.get("input_schema", {}).get("properties", {}).keys()
)
if sanitized_name not in fields and not name.startswith("to... | Review this code and list any quality issues. | [] | 0 |
python | import re
from .common import InfoExtractor
from ..utils import (
clean_html,
remove_end,
str_or_none,
traverse_obj,
urljoin,
)
class MediaStreamBaseIE(InfoExtractor):
_EMBED_BASE_URL = 'https://mdstrm.com/embed'
_BASE_URL_RE = r'https?://mdstrm\.com/(?:embed|live-stream)'
def _extra... | Review this code and list any quality issues. | [
{
"issue": "If you can make this a `classmethod`, then it can be defined as `MediaStreamIE_extract_embed_urls`. Base-class and _extract_from_webpage aren't needed then.",
"severity": "major",
"line": 16
}
] | 1 |
python | 'release_date': '20231015',
'age_limit': 15,
'thumbnail': 'https://fs.jtbc.co.kr//joydata/CP00000001/prog/enter/soccer3/img/20231008_210957_775_1.jpg',
'series': '뭉쳐야 찬다3',
},
}, {
'url': 'https://tv.jtbc.co.kr/trailer/pr10010392/pm10032526/vo10720912/view',
... | Review this code and list any quality issues. | [
{
"issue": "We can skip the webpage download when the id starts with `vo`. We have to uppercase it though",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'modified_date': '20250225',
},
'playlist_count': 1,
}]
def _real_extract(self, url):
locale, display_id, page_id = self._match_valid_url(url).group('locale', 'display_id', 'id')
json_data = self._download_json(
f'https://assets.msn.com/content/view/v2/Detail/{local... | Review this code and list any quality issues. | [
{
"issue": "I think we can have this be fatal since we raise anyways if it's not a known string value\r\n```suggestion\r\n page_type = json_data['type']\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Check if first line (after stripping whitespace) is exactly a
# fmt:off directive
first_line = lines[0].lstrip()
first_is_fmt_off = first_line in FMT_OFF
# Check if last line (after stripping whitespace) is exactly a
# fmt:on directive
last_line ... | Review this code and list any quality issues. | [
{
"issue": "Are we able to use `_contains_fmt_directive` from `comments.py` here?",
"severity": "minor",
"line": 26
}
] | 1 |
python | class FullyKioskConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Fully Kiosk Browser."""
VERSION = 1
host: str
def __init__(self) -> None:
"""Initialize the config flow."""
self._discovered_device_info: dict[str, Any] = {}
async def _create_entry(
self,
... | Review this code and list any quality issues. | [
{
"issue": "`except Exception` is likely to trigger Ruff's `BLE001` here; the `# pylint: disable=broad-except` comment will not silence Ruff. Please switch to the repo-standard suppression (for example `# noqa: BLE001`) or narrow the exception type if possible.\n```suggestion\n except Exception as error: # ... | 1 |
python | recency_column_name="created_date",
dependent_tables=["task_instance"],
),
_TableConfig(
table_name="dag_version",
recency_column_name="created_at",
dependent_tables=["task_instance", "dag_run"],
dag_id_column_name="dag_id",
keep_last=True,
keep_last_group... | Review this code and list any quality issues. | [
{
"issue": "Should query be renamed to statement(select_stmt) too?",
"severity": "minor",
"line": 26
}
] | 1 |
python | mock_config_entry.add_to_hass(hass)
await hass.config_entries.async_setup(mock_config_entry.entry_id)
await hass.async_block_till_done()
state = hass.states.get(ENTITY_ID)
assert state is not None
assert state.state == STATE_UNAVAILABLE
async def test_climate_zone_unavailable_on_sensor_damaged(
... | Review this code and list any quality issues. | [
{
"issue": "You can merge these two tests, by using parameterization of pytest.",
"severity": "minor",
"line": 26
}
] | 1 |
python | - “id_str”: (str) for pattern matching ids, it’s the stringified dict id with no white spaces.
- “property”: (str) The component property used in the callback.
- “value”: the value of the component property at the time the callback was fired.
- “triggered”: (bool)Whether this input triggered the... | Review this code and list any quality issues. | [
{
"issue": "What if someone makes a PMC ID with both `id` AND `property` as keys? Is there some other way we can tell the difference between a dict we should recurse into and a dict ID?",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Reorder the data on single controller such that each dp rank gets similar total tokens"""
attention_mask = batch.batch["attention_mask"]
batch_size = attention_mask.shape[0]
global_seqlen_lst = batch.batch["attention_mask"].view(batch_size, -1).sum(-1) # (train_batch_size,)
workload_... | Review this code and list any quality issues. | [
{
"issue": "Could you encapsulate this into a function?",
"severity": "minor",
"line": 26
}
] | 1 |
python | this field will be the guild to which it has been linked to.
.. versionadded:: 1.3
primary_sku_id: Optional[:class:`int`]
If this application is a game sold on Discord,
this field will be the id of the "Game SKU" that is created,
if it exists.
.. versionadded:: 1.3
sl... | Review this code and list any quality issues. | [
{
"issue": "Need new lines in between versionadded + the following attribute",
"severity": "minor",
"line": 26
}
] | 1 |
python | NiconicoUserIE,
NicovideoSearchDateIE,
NicovideoSearchIE,
NicovideoSearchURLIE,
NicovideoTagURLIE,
)
from .ninecninemedia import (
NineCNineMediaIE,
CPTwentyFourIE,
)
from .ninegag import NineGagIE
from .ninenow import NineNowIE
from .nintendo import NintendoIE
from .nitter import NitterIE
from ... | Review this code and list any quality issues. | [] | 0 |
python | srcUID = wvplayer_props.get('srcUID')
srcVID = wvplayer_props.get('srcVID')
srcNAME = wvplayer_props.get('srcNAME')
resolutions = [res for res in wvplayer_props.get('resolutions') if res > 0]
formats = []
for res in resolutions:
format_id = str(-(res // -2) - 1)
... | Review this code and list any quality issues. | [
{
"issue": "Better to use `_search_json`, though it's almost as brittle:\r\n```suggestion\r\n wvplayer_props = self._search_json(\r\n r'WVPlayer\\(', webpage, 'player', video_id,\r\n transform_source=lambda x: js_to_json(x.replace('autoplay', '}')))\r\n```\r\n \r\n`js_to_json` ... | 1 |
python | static_rigid_sim_config.max_n_dofs_per_entity,
static_rigid_sim_config.max_n_dofs_per_entity,
)
):
i_d = entities_info.dof_start[i_e] + i_d_
j_d = entities_info.dof_start[i_e] + j_d_
... | Review this code and list any quality issues. | [
{
"issue": "Atomic add is not necessary here.",
"severity": "minor",
"line": 26
}
] | 1 |
python | index_2 = index_1 + pd.offsets.Hour(5)
result = index_1.intersection(index_2)
assert len(result) == 0
index_1 = timedelta_range("1 day", periods=4, freq="h")
index_2 = index_1 + pd.offsets.Hour(1)
result = index_1.intersection(index_2)
expected = timedelta_range("1 day... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n assert inter is not first\n tm.assert_index_equal(inter, first)\n```\n\nJust to ensure it are still the same values",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Configuration for downloading and using a hub-based attention kernel."""
repo_id: str
function_attr: str
revision: Optional[str] = None
kernel_fn: Optional[Callable] = None
# Registry for hub-based attention kernels
_HUB_KERNELS_REGISTRY: Dict["AttentionBackendName", _HubKernelConfig] = {
# TO... | Review this code and list any quality issues. | [
{
"issue": "what about the other backends ?",
"severity": "minor",
"line": 26
}
] | 1 |
python | quat = quaternion_from_angle_axis(angle, axis)
return rotation_matrix_transpose_from_quaternion(quat)
def rotation_matrix(angle: Union[int, float], axis: np.ndarray) -> np.ndarray:
"""
Rotation in R^3 about a specified axis of rotation.
"""
about_z = rotation_about_z(angle)
z_to_axis = z_to_ve... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n Gives back the rotation matrix.\r\n```",
"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.