language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | para_level: int = dataclasses.field(metadata={FIELD_METADATA_CACHE_VALUE: True})
use_hibernation: bool = dataclasses.field(metadata={FIELD_METADATA_CACHE_VALUE: True})
use_contact_island: bool = dataclasses.field(metadata={FIELD_METADATA_CACHE_VALUE: True})
batch_links_info: bool = dataclasses.field(metadat... | Review this code and list any quality issues. | [
{
"issue": "There was no request ot support floats, only ints and bools. Whilst it seems plausible tht it might work with floats, note that this is not tested. Please consider creating a PR onto gstaichi to add a test for floats. Something like https://github.com/Genesis-Embodied-AI/gstaichi/blob/a00b3aa5154b4b... | 1 |
python | return cls.COLOR_DIFF
return cls.DIFF if diff else cls.YES
# Legacy name, left for integrations.
FileMode = Mode
def read_pyproject_toml(
ctx: click.Context, param: click.Parameter, value: Optional[str]
) -> Optional[str]:
"""Inject Black configuration from "pyproject.toml" into defaults in `ctx`.
... | Review this code and list any quality issues. | [
{
"issue": "What is the reason for this change?",
"severity": "minor",
"line": 26
}
] | 1 |
python | Buildkite pipeline for testing popular Docker containers
"""
from common import BKPipeline, random_str
pipeline = BKPipeline()
ROOTFS_TAR = f"rootfs_$(uname -m)_{random_str(k=8)}.tar.gz"
pipeline.build_group_per_arch(
":ship: Rootfs build",
[
"sudo yum install -y systemd-container",
"cd tool... | Review this code and list any quality issues. | [
{
"issue": "this needs to be updated as well\n\n```\n \"./tools/devtool ensure_current_artifacts\",\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def set_column_colors(self, *colors):
"""Set individual colors for each columns of the matrix.
Parameters
----------
colors : :class:`str`
The list of colors; each color specified corresponds to a column.
Returns
-------
:class:`Matrix`
T... | Review this code and list any quality issues. | [] | 0 |
python | ),
}
# https://stackoverflow.com/questions/61770698/sphinx-nit-picky-mode-but-only-for-links-i-explicitly-wrote
nitpick_ignore = [(key, value) for key in type_targets for value in type_targets[key]]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# -- Options for HTML output -... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n# We've decided to rely on RTD's default robots.txt, so we no longer need to specify a custom one,\r\n# see discussion at https://github.com/kedro-org/kedro/issues/3741\r\n# html_extra_path = [str(here / \"robots.txt\")]\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Preprocesses audio files from datasets, encodes them as mel spectrograms "
"and writes them to the disk. Audio files are also saved, to be used by the "
"vocoder for training.",
formatt... | Review this code and list any quality issues. | [] | 0 |
python | import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
from mpl_toolkits.axes_grid1 import make_axes_locatable
# Generate random data
x = np.random.random((10, 10))
# Compute histogram
counts, bins = np.histogram(x)
# Set up colormap and normalization
cmap = plt.get_cmap('viridis')
norm = mcolors.Bounda... | Review this code and list any quality issues. | [
{
"issue": "Why are you making the width of the bars (which is the height) equal to the difference of the bins? \n\nI use it in midpoints to center the bars between ticks that are labeled with the bin edges.",
"severity": "minor",
"line": 26
}
] | 1 |
python | >>> x = np.arange(0, 10)
>>> y = np.arange(0, 10)
>>> integrate.simpson(y, x=x)
40.5
>>> y = np.power(x, 3)
>>> integrate.simpson(y, x=x)
1640.5
>>> integrate.quad(lambda x: x**3, 0, 9)[0]
1640.25
"""
xp = array_namespace(y, x, dx)
y, x, dx = xp_promote(y, x, dx, xp=xp)
... | Review this code and list any quality issues. | [
{
"issue": "`returnshape` and `saveshape` were unused except for useless `x = x.reshape(saveshape)` at the end.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def add_base_model_name(self, source_id: int, name: str) -> None:
self.add_string(Keys.General.BASE_MODEL_NAME.format(id=source_id), name)
def add_base_model_author(self, source_id: int, author: str) -> None:
self.add_string(Keys.General.BASE_MODEL_AUTHOR.format(id=source_id), author)
def add_... | Review this code and list any quality issues. | [] | 0 |
python | def main(args: Namespace) -> None:
# ------------------------
# 1 INIT LIGHTNING MODEL
# ------------------------
model = GAN(args)
# ------------------------
# 2 INIT TRAINER
# ------------------------
# If use distubuted training PyTorch recommends to use DistributedDataParallel.
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # Add program level args, if any.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | parser.addoption("--vis", action="store_true", default=False, help="Enable interactive viewer.")
parser.addoption("--dev", action="store_true", default=False, help="Enable genesis debug mode.")
supported, _reason = is_mem_monitoring_supported()
help_text = (
"Run memory monitoring, and store results... | Review this code and list any quality issues. | [
{
"issue": "Why not to move this fixture in profiling since you already created a dedicated file? It would not work?",
"severity": "major",
"line": 26
}
] | 1 |
python | f"({points_count})."
)
if labels is None:
labels = [str(i) for i in range(points_count)]
return np.array(labels * skeletons_count)
@staticmethod
def preprocess_and_validate_colors(
colors: Optional[Union[Color, List[Color]]],
points_count: int,
s... | Review this code and list any quality issues. | [
{
"issue": "This does exactly the same as `preprocess_and_validate_colors`. Remove it.",
"severity": "minor",
"line": 26
}
] | 1 |
python | The alpha transparency of the created shadow patch.
rho : float, default: 0.3
A scale factor to apply to the rgbFace color if *shadow_rgbFace*
is not specified.
**kwargs
Extra keywords are stored and passed through to
:meth:`!AbstractPathEffect._update_gc`... | Review this code and list any quality issues. | [] | 0 |
python | extra_dims = [('dim_1', []), ('dim_0', [])]
expected_repr = (
"<DataSetFamily: 'MD3', extra_dims=['dim_1', 'dim_0']>"
)
assert_equal(repr(MD3), expected_repr)
def test_cache(self):
class MD1(DataSetFamily):
extra_dims = [('dim_0', ['a', 'b', 'c'])]
... | Review this code and list any quality issues. | [
{
"issue": "why the change to a regex with no pattern?",
"severity": "minor",
"line": 26
}
] | 1 |
python | q0 = q0 / torch.linalg.norm(q0, dim=-1, keepdim=True)
q1 = q1 / torch.linalg.norm(q1, dim=-1, keepdim=True)
dot_product = torch.sum(q0 * q1, dim=-1, keepdim=True)
neg_mask = dot_product < 0
q1 = torch.where(neg_mask, -q1, q1)
dot_product = torch.where(neg_mask, -dot_product, dot_product)
dot_p... | Review this code and list any quality issues. | [
{
"issue": "Remove this temporary variable. It is useless here and theoretically slower.",
"severity": "major",
"line": 26
}
] | 1 |
python | from_fields = getattr(field, "from_fields", None)
if from_fields:
field.from_fields = tuple(
[
new_name if from_field_name == old_name else from_field_name
for from_field_name in from_fields
]
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n }\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | else:
sigs_path = Path(args.signatures)
logger.debug("using signatures path: %s", sigs_path)
args.signatures = sigs_path
def last_resort_exception_handler(
args: argparse.Namespace,
exctype: Optional[Type[BaseException]],
value: Optional[BaseException],
traceback: Opti... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if args.debug:\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | Node.deserialize(data["node"]),
data.get("description", ""),
)
@dataclass
class NodeVariants:
"""This class represents the variants of a node.
:param default_variant_id: The default variant id of the node.
:type default_variant_id: str
:param variants: The variants of the node.
... | Review this code and list any quality issues. | [] | 0 |
python | return []
return value
class WorkflowRunNodeExecutionResponse(ResponseModel):
id: str
index: int
predecessor_node_id: str | None = None
node_id: str
node_type: str
title: str | None = None
inputs: dict[str, JSONValue] | None = Field(default=None, validation_alias=AliasChoices("inpu... | Review this code and list any quality issues. | [
{
"issue": "The validation_alias is redundant here since the field name \"created_by_account\" already matches the source attribute name. When using from_attributes=True, Pydantic will automatically look for an attribute with the same name as the field. The validation_alias is only needed when you want to map f... | 1 |
python | NextMediaIE,
NextMediaActionNewsIE,
AppleDailyIE,
NextTVIE,
)
from .nexx import (
NexxIE,
NexxEmbedIE,
)
from .nfb import NFBIE
from .nfhsnetwork import NFHSNetworkIE
from .nfl import (
NFLIE,
NFLArticleIE,
)
from .nhk import (
NhkVodIE,
NhkVodProgramIE,
NhkForSchoolBangumiIE,
... | Review this code and list any quality issues. | [] | 0 |
python | import os
import subprocess
import pytest
from awx.main.tests.live.tests.conftest import wait_for_job
def test_git_file_project(live_tmp_folder, run_job_from_playbook):
run_job_from_playbook('test_git_file_project', 'debug.yml', scm_url=f'file://{live_tmp_folder}/debug')
@pytest.mark.parametrize('allow_overri... | Review this code and list any quality issues. | [] | 0 |
python | # Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | Review this code and list any quality issues. | [] | 0 |
python | self._host = discovery_info.host
self._async_abort_entries_match({CONF_HOST: self._host})
websession = async_get_clientsession(self.hass)
client = Homevolt(self._host, None, websession=websession)
errors = await self.check_status(client)
if errors.get("base") == "invalid_auth":
... | Review this code and list any quality issues. | [
{
"issue": "If i now need a password i get an initial step telling me device is discovered, then a step to enter credentials. In theory we can combine them",
"severity": "critical",
"line": 26
}
] | 1 |
python | df2 = pd.DataFrame(selected_jd['keyterms'], columns=["keyword", "value"])
# Create the dictionary
keyword_dict = {}
for keyword, value in selected_jd['keyterms']:
keyword_dict[keyword] = value * 100
fig = go.Figure(data=[go.Table(header=dict(values=["Keyword", "Value"],
... | Review this code and list any quality issues. | [
{
"issue": "The refactoring update simplifies variable assignments and updates method access, which is good. A suggestion would include error handling around the new function `get_score` to ensure robustness.\r\n\r\nExample:\r\n```python\r\ntry:\r\n result = get_score(resume_string, jd_string)\r\n similar... | 1 |
python | """Resolves dataset configurations based on patterns and credentials."""
def __init__(
self,
config: dict[str, dict[str, Any]] | None = None,
credentials: dict[str, dict[str, Any]] | None = None,
runtime_patterns: Patterns | None = None,
):
if runtime_patterns is None:
... | Review this code and list any quality issues. | [
{
"issue": "[Nit] we have `_resolve_credentials` within the class as well. Should we call this `_resolve_credentials_helper` or with some other name to avoid confusion ?",
"severity": "critical",
"line": 26
}
] | 1 |
python | }, {
'url': 'https://www.yfanefa.com/evaluating_nature_matters',
'info_dict': {
'id': 'evaluating_nature_matters',
'ext': 'mp4',
'title': 'Evaluating Nature Matters',
},
'params': {'skip_download': True},
}]
def _real_extract(self, url):
... | Review this code and list any quality issues. | [
{
"issue": "Let's use the _search_json helper instead and extract the entire set of player options\r\n```suggestion\r\n player_data = self._search_json(\r\n r'iwPlayer\\.options\\[\"[\\w.]+\"\\]\\s*=', webpage, 'player options', video_id)\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | async def _achat_completion(self, messages: list[dict]) -> dict:
rsp = await self.llm.ChatCompletion.acreate(**self._cons_kwargs(messages))
self._update_costs(rsp.get('usage'))
return rsp
def _chat_completion(self, messages: list[dict]) -> dict:
rsp = self.llm.ChatCompletion.create(... | Review this code and list any quality issues. | [
{
"issue": "Why to raraise the exception, since you've already handled this exception? For regular users, seeing a long string of error output might lead them to believe there's a problem with the program, overlooking the possibility of the network issue.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def refresh_interface(session_id:str)->tuple:
session = context.get_session(session_id)
if session and session.get('id', False):
if session['event'] == 'confirm_blocks':
outputs = tuple([gr.update() for _ in range(9)])
r... | Review this code and list any quality issues. | [
{
"issue": "Inconsistent type used for the visible parameter. The code is mixing boolean values (True) with string values ('hidden') for the visible parameter. Throughout the codebase, gr.update() consistently uses boolean False for the visible parameter (see lines 965, 969, 978, 1053, 1057, 1070, 1074, 1076, 1... | 1 |
python | if readable_dag_ids is not None and dag not in readable_dag_ids:
continue
dag_node_id = f"dag:{dag}"
if dag_node_id not in nodes_dict:
for dep in dependencies:
# Add nodes
nodes_dict[dag_node_id] = {"id": dag_node_id, "label": dag, "type": "dag"}
... | Review this code and list any quality issues. | [] | 0 |
python | """Initialize a Portainer endpoint."""
super().__init__(coordinator)
self._device_info = device_info
self.device_id = device_info.endpoint.id
self._attr_device_info = DeviceInfo(
identifiers={
(DOMAIN, f"{coordinator.config_entry.entry_id}_{self.device_id}")
... | Review this code and list any quality issues. | [] | 0 |
python | register_conv_template(
Conversation(
name="claude",
system="",
roles=("Human", "Assistant"),
messages=(),
offset=0,
sep_style=SeparatorStyle.ADD_COLON_SINGLE,
sep="\n\n",
)
)
# MPT default template
register_conv_template(
Conversation(
name="... | Review this code and list any quality issues. | [
{
"issue": "I noticed that they used \"\\n\" instead of \":\" (colon) in their official demo.\r\nCan we change it to match their official demo?\r\nhttps://huggingface.co/spaces/mosaicml/mpt-7b-chat/blob/22728d16cb77d5f7ae2c2598b82b471c4d6915a0/app.py#L66-L67",
"severity": "minor",
"line": 26
}
] | 1 |
python | task.cancel()
reporter.info("All tasks cancelled. Exiting...")
# Register signal handlers for SIGINT and SIGHUP
signal.signal(signal.SIGINT, handle_signal)
if sys.platform != "win32":
signal.signal(signal.SIGHUP, handle_signal)
def index_cli(
root_dir: str,
init: bool,
verbos... | Review this code and list any quality issues. | [] | 0 |
python | obj = VGroup()
assert len(obj.submobjects) == 0
obj + VMobject()
assert len(obj.submobjects) == 0
obj += VMobject()
assert len(obj.submobjects) == 1
with pytest.raises(TypeError):
obj += Mobject()
assert len(obj.submobjects) == 1
with pytest.raises(TypeError):
# If only o... | Review this code and list any quality issues. | [] | 0 |
python | --------
.. manim:: LabeledLineExample
:save_last_frame:
class LabeledLineExample(Scene):
def construct(self):
line = LabeledLine(
label = '0.5',
label_position = 0.8,
font_size = 20,
... | Review this code and list any quality issues. | [
{
"issue": "Should this be DEFAULT_FONT_SIZE? Is 15 too small/too specific to the neural network stuff?\r\n```suggestion\r\n font_size: float = DEFAULT_FONT_SIZE,\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | class _MatchedSubstring(Substring):
"""
this represents specific match instances of a substring feature.
treat it the same as a `Substring` except it has the `matches` field that contains the complete strings that matched.
note: this type should only ever be constructed by `Substring.evaluate()`. it is... | Review this code and list any quality issues. | [
{
"issue": "also too complex. please simplify by using more statements.",
"severity": "major",
"line": 26
}
] | 1 |
python | async def test_app_blur() -> None:
"""Test that AppBlur removes focus."""
async with FocusBlurApp().run_test() as pilot:
assert pilot.app.focused is not None
assert pilot.app.focused.id == "input-4"
pilot.app.post_message(AppBlur())
await pilot.pause()
assert pilot.app.fo... | Review this code and list any quality issues. | [] | 0 |
python | res1 = differential_evolution(rosen, bounds, updating='deferred',
rng=1, constraints=[nlc1, nlc2],
polish=False)
res2 = differential_evolution(rosen_vec, bounds, vectorized=True,
updating='deferred'... | Review this code and list any quality issues. | [
{
"issue": "Oh, I see above - this is populated from the result returned by the `polish` function if available.",
"severity": "minor",
"line": 26
}
] | 1 |
python | }]
if webvtt_resource := video_assets.get('webvttUrl'):
subtitles.setdefault('de', []).append({
'url': webvtt_resource,
'ext': 'vtt',
})
return {
'id': video_id,
'formats': list(self._extract_formats(video_assets, video_id)... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n for media in traverse_obj(media_info, ('assets', lambda _, v: url_or_none(v['url']))):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _find_fanclub_site_id(self, channel_name):
fanclub_list_json = self._call_api(
'content_providers/channels', item_id=f'channels/{channel_name}',
note='Fetching channel list', errnote='Unable to fetch channel list',
)['data']['content_providers']
fanclub_id = traverse_... | Review this code and list any quality issues. | [
{
"issue": "Non-fatal metadata again:\r\n```suggestion\r\n def _get_channel_user_info(self, fanclub_site_id):\r\n return traverse_obj(self._call_api(\r\n f'fanclub_sites/{fanclub_site_id}/user_info', item_id=f'fanclub_sites/{fanclub_site_id}',\r\n note='Fetching channel user info... | 1 |
python | def find_differences(video1, video2) -> tuple[list[int], list, tuple[int, int]]:
with tempfile.TemporaryDirectory() as tmpdir:
tmpdir = Path(tmpdir)
print(f"Extracting frames from {video1}...")
frames1_dir = tmpdir / "frames1"
frames1_dir.mkdir()
frames1 = extract_frames(video1, frames1_dir)
... | Review this code and list any quality issues. | [
{
"issue": "`find_differences` reports and uses `len(frames1)` as the comparison length, but the loop iterates over `zip(frames1, frames2)` which stops at the shorter video. This makes the \"Comparing … frames\" log inaccurate and can break the `i >= len(frames1) - 10` condition when `frames1` is longer (you’ll... | 1 |
python | if isinstance(out, bytes): # Python 2.x
out = out.decode('ascii', 'ignore')
return out
def detect_exe_version(output, version_re=None, unrecognized='present'):
assert isinstance(output, compat_str)
if version_re is None:
version_re = r'version\s+([-0-9._a-zA-Z]+)'
m = re.search(versio... | Review this code and list any quality issues. | [] | 0 |
python | not seekable).
"""
if callable(getattr(self.stream, "getvalue", None)):
return self.stream.getvalue()
def _should_include_pk(self, obj):
"""
Determines whether the Primary Key (PK) should be included in the
serialized data for the given object, especially when
... | Review this code and list any quality issues. | [
{
"issue": "Could this logic be flipped around and cleaned up w/ Demorgan's Law?\r\n\r\n```\r\nif callable(natural_key_func):\r\n natural_key_value = natural_key_func()\r\n if natural_key_value and isinstance(natural_key_value, tuple):\r\n pk_included = False\r\n```",
"severity": "minor",
"... | 1 |
python | def satoshi_round(amount: Union[int, float, str], *, rounding: str) -> Decimal:
"""Rounds a Decimal amount to the nearest satoshi using the specified rounding mode."""
return Decimal(amount).quantize(SATOSHI_PRECISION, rounding=rounding)
def wait_until_helper_internal(predicate, *, attempts=float('inf'), time... | Review this code and list any quality issues. | [
{
"issue": "ultra tiny nit: same code, a bit shorter.\r\n```python3\r\npredicate_source = \"''''\\n\" + inspect.getsource(predicate) + \"'''\"\r\nwhile True:\r\n if not predicate():\r\n raise AssertionError(\"Predicate {} became false within {} seconds\".format(predicate_source, duration))\r\n if ... | 1 |
python | # threads.
#
# .. code-block:: python
#
# grid_search = GridSearchCV(clf, param_grid=param_grid, n_jobs=4)
# with joblib.parallel_config(backend="threading"):
# grid_search.fit(X, y)
#
# - don't hesitate to report any issue or unexpected performance behaviour by
# opening an `GitHub issue <h... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n# backend and testing that everything works well with free-threaded Python is a\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return {
'id': audio_id,
'url': 'http://media.rozhlas.cz/_audio/%s.mp3' % audio_id,
'title': title,
'description': description,
'duration': duration,
'vcodec': 'none',
}
class RozhlasVltavaIE(InfoExtractor):
_VALID_URL = r'https?://(?... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'title': 'Papej masíčko! Porcujeme a bilancujeme filmy a seriály, které to letos zabily',\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def generate_annotation_content(
annotation: MessageTextFilePathAnnotation | MessageTextFileCitationAnnotation | MessageTextUrlCitationAnnotation,
) -> AnnotationContent:
"""Generate annotation content."""
file_id = None
url = None
title = None
citation_type = None
if isinstance(annotation, ... | Review this code and list any quality issues. | [
{
"issue": "nit: title is None by default. It the annotation returns an empty string, we should pass it as it is instead of a None.",
"severity": "minor",
"line": 26
}
] | 1 |
python | "Oracle doesn't support bitwise XOR.": {
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor",
"expressions.tests.ExpressionOperatorTests."
"test_lefthand_bitwise_xor_null",
"expressions.tests.ExpressionOperatorTests."
"tes... | Review this code and list any quality issues. | [
{
"issue": "@jacobtylerwalls you were right about there being no way to extract a JSON scalar `null` value in Oracle. Oracle's JSON/SQL functions will convert it to SQL NULL. The way key transform exact handles this is by changing `__key__exact=JSONNull()` to \"does the JSON value have the key and is the key NU... | 1 |
python | """
# Remove the test database to clean up after
# ourselves. Connect to the previous database (not the test database)
# to do so, because it's not allowed to delete a database while being
# connected to it.
with self._nodb_cursor() as cursor:
cursor.execute(
... | Review this code and list any quality issues. | [
{
"issue": "\"do not expect\" seems like a verbiage change from the previous sentence. Here's my suggestion:\r\n\r\nimport_string() can raise ImportError if a submodule's parent module hasn't already been imported during test discovery. This can happen in at least two cases:\r\n1. When running a subset of tests... | 1 |
python | #!/usr/bin/env python3
# Copyright (c) 2025, The Ladybird contributors
#
# SPDX-License-Identifier: BSD-2-Clause
import json
import sys
VCPKG = "vcpkg.json"
FLATPAK_MANIFEST = "Meta/CMake/flatpak/org.ladybird.Ladybird.json"
def check_vcpkg_vs_flatpak_versioning():
vcpkg = {}
mismatch_found = False
wit... | Review this code and list any quality issues. | [
{
"issue": "We read all the vcpkg versions, but we don't report packages that are _only_ mentioned in vcpkg but not the flatpak. This is a common mistake (we add a new dependency but forgot to add it to flatpak, e.g. see cpptrace). Can this script spot those as well?",
"severity": "minor",
"line": 26
... | 1 |
python | >>> pd.arrays.IntervalArray.from_arrays([0, 1, 2], [1, 2, 3])
<IntervalArray>
[(0, 1], (1, 2], (2, 3]]
Length: 3, dtype: interval[int64, right]
"""
),
}
)
def from_arrays(
cls,
left,
right,
closed: IntervalClosedType | None = "r... | Review this code and list any quality issues. | [
{
"issue": "can't we just compare `if left.dtype != right.dtype` at this point?",
"severity": "minor",
"line": 26
}
] | 1 |
python | w.text = str(width)
h = SubElement(size, "height")
h.text = str(height)
d = SubElement(size, "depth")
d.text = str(depth)
# Add segmented element
segmented = SubElement(annotation, "segmented")
segmented.text = "0"
# Add object elements
for xyxy, mask, _, class_id, _ in detections:... | Review this code and list any quality issues. | [
{
"issue": "Let's move our changes to `object_to_pascal_voc` function body.\r\n- Right now we need to make changes in multiple places. It would be better to do them in one place.\r\n- We handled `xyxy` mutation but not `polygon`",
"severity": "minor",
"line": 26
}
] | 1 |
python | @pytest.mark.skipif("sys.platform != 'win32'")
@pytest.mark.parametrize(
"path, url",
[
pytest.param("c:/tmp/file", "file:///C:/tmp/file", id="posix-path"),
pytest.param("c:\\tmp\\file", "file:///C:/tmp/file", id="nt-path"),
],
)
def test_path_to_url_win(path: str, url: str) -> None:
ass... | Review this code and list any quality issues. | [
{
"issue": "Just to be sure, `file:c:/file` (and `file:/c:/file`) is the non-normative form of `file:///c:/file` but they are effectively equivalent, right?",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'video_url,media_type,format',
[
pytest.param(VideoUrl('foobar.mp4'), 'video/mp4', 'mp4', id='mp4'),
pytest.param(VideoUrl('foobar.mov'), 'video/quicktime', 'mov', id='mov'),
pytest.param(VideoUrl('foobar.mkv'), 'video/x-matroska', 'mkv', id='mkv'),
pytest.param(VideoUrl('foobar.webm... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n@pytest.mark.skipIf(\r\n sys.version_info < (3, 11),\r\n reason='Python 3.10's mimetypes module does not support query parameters',\r\n)\r\ndef test_url_with_query_parameters() -> None:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if res:
res += ' '
res += '[{}]'.format(fdict['language'])
if fdict.get('format_note') is not None:
if res:
res += ' '
res += fdict['format_note']
if fdict.get('tbr') is not None:
if res:
res += ', '
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n res += '{:4.0f}k'.format(fdict['vbr'])\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | need_confirm_age = False
if self._html_search_regex(r'(<form[^>]+action="[^"]*/a/validatebirth[^"]*")',
webpage, 'birthday validate form', default=None):
webpage = self._download_age_confirm_page(
url, video_id, note='Confirming age')
ne... | Review this code and list any quality issues. | [
{
"issue": "use query param to make sure username is encoded properly",
"severity": "minor",
"line": 26
}
] | 1 |
python | If the executable is not found or older than the oldest version
supported by Matplotlib. For debugging purposes, it is also
possible to "hide" an executable from Matplotlib by adding it to the
:envvar:`_MPLHIDEEXECUTABLES` environment variable (a comma-separated
list), which must be set... | Review this code and list any quality issues. | [
{
"issue": "I might actually prefer `args` to be output as-is, just in case someone is passing something with spaces as an argument, as that keeps that visible.",
"severity": "minor",
"line": 26
}
] | 1 |
python | ),
)
########################## entities ##########################
plane = scene.add_entity(
gs.morphs.Plane(),
)
franka = scene.add_entity(
gs.morphs.MJCF(file="xml/franka_emika_panda/panda.xml"),
visualize_contact=True,
)
########################## cameras ######... | Review this code and list any quality issues. | [] | 0 |
python | #if n < 3071837692357849:
# return mr(n, [2, 75088, 642735, 203659041, 3613982119])
#if n < 18446744073709551616:
# return mr(n, [2, 325, 9375, 28178, 450775, 9780504, 1795265022])
# Step 3: BPSW.
#
# Time for isprime(10**2000 + 4561), no gmpy or gmpy2 installed
# 44.0s old isp... | Review this code and list any quality issues. | [
{
"issue": "Since this function calls `sympify` the actual type it can expect is more than just `Expr`. I would change this to `Expr | complex` which is a shorthand for `Expr | complex | float | int` since all those types can be sympified to give Expr.",
"severity": "minor",
"line": 26
}
] | 1 |
python | if auth_type != 'oauth':
raise ExtractorError(
'Login using username and password is not supported. '
'Use --username=oauth[+PROFILE] --password="" to log in using oauth, '
f'or else {self._login_hint(method="cookies")}', expected=True)
self._initia... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # YouTube TV (TVHTML5) client. You can find these at youtube.com/tv\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # convert self.vector to "formatted" parameters
params = {}
for i, spec in enumerate(self.space.values()):
x = self.grid[i][self.vector[i]]
if spec.categorical:
params[spec.key] = x
else:
params[spec.key] = _cdf_inverse(x, spec)
... | Review this code and list any quality issues. | [
{
"issue": "in which case, x < y but real_x > real_y?",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Helpers functions for devs to set up new graphical-units data."""
from __future__ import annotations
import os
import tempfile
from operator import truediv
from pathlib import Path
import numpy as np
from manim import config, logger
def set_test_scene(scene_object, module_name):
"""Function used to set up... | Review this code and list any quality issues. | [
{
"issue": "I think this does not need to be added here?\r\n```suggestion\r\n```",
"severity": "minor",
"line": 8
}
] | 1 |
python | {
# Old URL
'url': 'https://www.playsuisse.ch/watch/763211/0',
'only_matching': True,
},
{
# episode in a series
'url': 'https://www.playsuisse.ch/watch/763182?episodeId=763211',
'md5': '82df2a470b2dfa60c2d33772a8a60cf8',
... | Review this code and list any quality issues. | [
{
"issue": "The old movie/URL was dead, I added an available movie.\r\nBut since idk how this md5 is generated, i left it as it is:\r\n```\r\n'md5': '818b94c1d2d7c4beef953f12cb8f3e75',\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | func=self.dummy_function,
inputs="input.dataset",
outputs="output_dataset",
)
def test_invalid_outputs_with_dot_no_namespace(self):
"""Test that outputs with '.' but no namespace raise a ValueError."""
with pytest.raises(ValueError, match="Invalid dataset... | Review this code and list any quality issues. | [
{
"issue": "maybe the test name here can be `test_dataset_namespace_matches_pipeline_namespace(self)`:",
"severity": "minor",
"line": 26
}
] | 1 |
python | while self.iter < self._max_iters:
for i, flow in enumerate(workflow):
self._inner_iter = 0
mode, iters = flow
if not isinstance(mode, str) or not hasattr(self, mode):
raise ValueError(
'runner has no method named "{... | Review this code and list any quality issues. | [
{
"issue": "all of the code is taken from mmcv.runner.epoch_based_runner.py, the only difference is that I added time.time(). Essentially, the idea is that we want to clear gpu every 10 minutes, otherwise there would be a greater gpu memory fluctuations.",
"severity": "major",
"line": 26
}
] | 1 |
python | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
int_or_none,
qualities,
)
class RedGifsIE(InfoExtractor):
_VALID_URL = r'https?://(?:(?:www|thumbs2?)\.)?redgifs\.com/(?:watch/)?(?P<id>[^-/?#\.]+)'
_TESTS = [{
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n\r\nfrom .common import InfoExtractor\r\nfrom ..utils import (\r\n ExtractorError,\r\n int_or_none,\r\n qualities,\r\n)\r\n\r\n```",
"severity": "major",
"line": 12
}
] | 1 |
python | model=MODEL,
name=self.coordinator.name,
)
@property
def condition(self) -> str:
"""Return the current condition."""
return format_condition(self.coordinator.data["weather"].condition)
@property
def native_temperature(self) -> float:
"""Return the temperatur... | Review this code and list any quality issues. | [
{
"issue": "The return type hint should be `float | None` to match the base class `WeatherEntity.native_wind_speed` property signature. The base class defines this as a `@cached_property` that returns `float | None`.\n```suggestion\n def native_wind_speed(self) -> float | None:\n```",
"severity": "major"... | 1 |
python | cls.sids = cls.ASSET_FINDER_EQUITY_SIDS
cls.assets = cls.engine._finder.retrieve_all(
cls.ASSET_FINDER_EQUITY_SIDS)
def expected_latest(self, column, slice_):
loader = self.seeded_random_loader
index = self.trading_days[slice_]
columns = self.assets
values = load... | Review this code and list any quality issues. | [] | 0 |
python | @frames_comparison(last_frame=False)
def test_ZIndex(scene):
circle = Circle().set_fill(RED, opacity=1)
square = Square(side_length=1.7).set_fill(BLUE, opacity=1)
triangle = Triangle().set_fill(GREEN, opacity=1)
square.z_index = 0
triangle.z_index = 1
circle.z_index = 2
scene.play(FadeIn(VG... | Review this code and list any quality issues. | [
{
"issue": "I think this test could be improved a bit: take a look at the rendered test output:\r\n\r\n\r\n\r\nIf there was a problem with any of the angles, it would be very hard to distinguish visual... | 1 |
python | import json
import urllib
from .common import InfoExtractor
from ..utils import clean_html, remove_end, unescapeHTML, unified_timestamp, url_or_none
from ..utils.traversal import traverse_obj
class TvwIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?tvw\.org/video/(?P<id>[^/?#]+)'
_TESTS = [{
'u... | Review this code and list any quality issues. | [
{
"issue": "For my changes from below to work\r\n```suggestion\r\nfrom ..utils import (\r\n clean_html,\r\n extract_attributes,\r\n parse_qs,\r\n remove_end,\r\n unified_timestamp,\r\n url_or_none,\r\n)\r\nfrom ..utils.traversal import find_element, require, traverse_obj\r\n```",
"severity... | 1 |
python | import sys
import xml.etree.ElementTree as ET
import pytest
import trimesh
import torch
import os
import numpy as np
from huggingface_hub import snapshot_download
import mujoco
import genesis as gs
from .utils import (
init_simulators,
check_mujoco_model_consistency,
check_mujoco_data_consistency,
si... | Review this code and list any quality issues. | [
{
"issue": "Could you split dependencies as mentioned above?",
"severity": "minor",
"line": 6
}
] | 1 |
python | self, elapsed_time: Decimal, left: Decimal, right: Decimal
) -> Decimal:
return self.calculate_area_with_one_state(elapsed_time, left)
def validate_states(self, left: str, right: str) -> tuple[Decimal, Decimal] | None:
if (left_dec := _decimal_state(left)) is None:
return None
... | Review this code and list any quality issues. | [
{
"issue": "`except InvalidOperation, TypeError:` is invalid syntax in Python 3. Use `except (InvalidOperation, TypeError):`.\n```suggestion\n except (InvalidOperation, TypeError):\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | dims: the shape
Returns:
SparseTensorProto
"""
sparse = SparseTensorProto()
sparse.values.CopyFrom(values)
sparse.indices.CopyFrom(indices)
sparse.dims.extend(dims)
return sparse
def make_sequence(
name: str,
elem_type: SequenceProto.DataType,
values: Sequence[Any],
) ... | Review this code and list any quality issues. | [
{
"issue": "So this should be mutable sequence?",
"severity": "minor",
"line": 26
}
] | 1 |
python | cg_beta: V_ANNOTATION
cg_pg_dot_pMg: V_ANNOTATION
# Optional Newton fields
nt_H: V_ANNOTATION
nt_vec: V_ANNOTATION
def get_constraint_state(constraint_solver, solver):
f_batch = solver._batch_shape
len_constraints = constraint_solver.len_constraints
len_constraints_ = constraint_solver.len... | Review this code and list any quality issues. | [
{
"issue": "Only move to new line if necessary:\r\n```python\r\n gs.logger.warning(\r\n f\"efc_AR shape {len_constraints_}x{len_constraints_}x{f_batch()[0]} is very large. Consider manually \"\r\n f\"set a smaller 'max_collision_pairs' in RigidOptions to reduce the size ... | 1 |
python | self.nodes[0].createwallet("activewallet")
self.wallet = self.nodes[0].get_wallet_rpc("activewallet")
self.def_wallet = self.nodes[0].get_wallet_rpc(self.default_wallet_name)
self.generate(self.nodes[0], 101)
self.recipient = self.def_wallet.getnewaddress() # payee for a specific amount
... | Review this code and list any quality issues. | [
{
"issue": "Receiving a test failure here:\r\n\r\n```\r\n2024-02-28T02:12:00.025000Z TestFramework (INFO): Test that sendall does ancestor aware funding for unconfirmed inputs\r\n2024-02-28T02:12:00.174000Z TestFramework (ERROR): Assertion failed\r\nTraceback (most recent call last):\r\n File \"/path/to/bitcoi... | 1 |
python | })),
}
class IdagioRecordingIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?app\.idagio\.com/recordings/(?P<id>[0-9]+)($|\?(?!trackId=[0-9]+))'
_TESTS = [{
'url': 'https://app.idagio.com/recordings/30576934',
'info_dict': {
'id': '30576934',
'title': 'Varia... | Review this code and list any quality issues. | [
{
"issue": "If the recording info is mandatory, we can make this fatal\r\n```suggestion\r\n recording_id = self._match_id(url)\r\n recording_info = self._download_json(\r\n f'https://api.idagio.com/v2.0/metadata/recordings/{recording_id}',\r\n recording_id)['result']\r\n```",... | 1 |
python | output = (reshape_uniq(output[0]),) + output[1:]
return _unpack_tuple(output)
def _unique1d(ar, return_index=False, return_inverse=False,
return_counts=False, *, equal_nan=True, inverse_shape=None,
axis=None, sorted=True):
"""
Find the unique elements of an array, ignoring shap... | Review this code and list any quality issues. | [
{
"issue": "@ngoldbaum switching the commented status of these two lines to import from `_multiarray_umath` gives a segfault at this line:\r\n\r\nhttps://github.com/numpy/numpy/pull/26018/files#diff-32d1424a27bdc13b58b84b0f68013d5ea1fc5bcf48ad954066b437431e3d5939R138\r\n\r\nNot sure why, I could use some hints ... | 1 |
python | formats = []
for url in potential_urls:
formats.extend(self._extract_m3u8_formats(url, video_id, fatal=False))
subtitles = {}
for track in traverse_obj(data, ('result', 'text_tracks', lambda _, v: url_or_none(v['url']))):
subtitles.setdefault(track.get('language', 'und')... | Review this code and list any quality issues. | [
{
"issue": "maybe a helper would be nice for these, e.g.\r\n```py\r\ndef if_series(key=None):\r\n def func(obj):\r\n return obj[key] if key and obj['kind'] == 'series' else None\r\n return func\r\n```\r\n```suggestion\r\n 'series': ('episode', {if_series(key='program')}, 'title'),\r\... | 1 |
python | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
try:
from .version import __version__ # pylint: disable=import-error
except ModuleNotFoundError:
__version__ = '999.dev0'
from .runtime.log import init_logger
init_logger()
from .runtime.env_vars import dispatcher_env_vars
from .utils ... | Review this code and list any quality issues. | [
{
"issue": "Is it proper to import this at top level?",
"severity": "minor",
"line": 12
}
] | 1 |
python | _scp_targets_account_or_ou(fake_scp, "100", fake_ous)
)
self.assertFalse(result)
def test_fetch_managed_policy_details(self):
from consoleme.config import config
from consoleme.lib.aws import fetch_managed_policy_details
loop = asyncio.get_event_loop()
result = loo... | Review this code and list any quality issues. | [] | 0 |
python | )
ns["PyScript"] = DeprecatedGlobal("PyScript", PyScript, message)
class _PyscriptWebLoop(WebLoop):
def __init__(self):
orig_loop = asyncio.get_event_loop()
super().__init__()
asyncio._set_running_loop(orig_loop)
self.ready = False
self.deferred_handles = []
def ca... | Review this code and list any quality issues. | [
{
"issue": "small nitpick should we call it `handle` instead of `h`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | break
return arg_value
# Any combination of the following arguments can be applied
if parse_arg_remove_boolean(sys.argv, "--nightly_build"):
nightly_build = True
wheel_name_suffix = parse_arg_remove_string(sys.argv, "--wheel_name_suffix=")
cuda_version = None
cuda_major_version = None
is_cuda_version_12 =... | Review this code and list any quality issues. | [
{
"issue": "nit: can be simplified as\n```\n is_cuda_version_12 = cuda_version.startswith(\"12.\")\n is_cuda_version_13 = cuda_version.startswith(\"13.\")\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'subtitles': subtitles,
}
class GronkhFeedIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?gronkh\.tv/?(feed/?)?$'
IE_NAME = 'gronkh:feed'
_TESTS = [{
'url': 'https://gronkh.tv/feed',
'info_dict': {
'_type': 'playlist',
'id': 'feed',
'title'... | Review this code and list any quality issues. | [
{
"issue": "needs to be only `only_matching`",
"severity": "minor",
"line": 26
}
] | 1 |
python | api_key = self.config.api_key or os.getenv("GOOGLE_API_KEY")
if api_key:
self.client = genai.Client(api_key="api_key")
else:
self.client = genai.Client()
def embed(self, text, memory_action: Optional[Literal["add", "search", "update"]] = None):
"""
Get th... | Review this code and list any quality issues. | [
{
"issue": "We can use the `config.embedding_dims` here",
"severity": "minor",
"line": 26
}
] | 1 |
python | return format_llm_response(
response=response,
api=self._model.api,
response_format=params.get("response_format", {}),
is_first_choice=self._data.get("model", {}).get("response", None) != "all",
streaming=params.get("stream", False),
outputs=self._... | Review this code and list any quality issues. | [
{
"issue": "add the reason of this is openai will reject request based on sum of request(prompt)+ reponse(max_token().",
"severity": "minor",
"line": 26
}
] | 1 |
python | ):
j_d = j_d_ if ti.static(not BW) else entities_info.dof_start[i_e] + j_d_
if func_check_index_range(j_d, entity_dof_start, i_d + 1, BW):
rigid_global_info.mass_mat_L[i_d, j_d, i_b] = rigid_global_info.mass... | Review this code and list any quality issues. | [
{
"issue": "atomic add is not necessary here.",
"severity": "minor",
"line": 26
}
] | 1 |
python | rope_theta: float
rope_type: str | None
partial_rotary_factor: float | None
factor: float | None
original_max_position_embeddings: int | None
attention_factor: float | None
beta_fast: float | None
beta_slow: float | None
short_factor: list[float] | None
long_factor: list[float] | Non... | Review this code and list any quality issues. | [
{
"issue": "i think what we had in L633-636 was doing the same, and a bit more by checking `kwargs`. Can we revert it back?",
"severity": "minor",
"line": 26
}
] | 1 |
python | from dataclasses import dataclass
from typing import Any
from zwave_js_server.exceptions import BaseZwaveJSServerError
from zwave_js_server.model.driver import Driver
from zwave_js_server.model.value import (
SetValueResult,
Value as ZwaveValue,
get_value_id_str,
)
from homeassistant.config_entries import... | Review this code and list any quality issues. | [
{
"issue": "The constants EVENT_VALUE_ADDED and EVENT_VALUE_REMOVED are defined here in entity.py, but EVENT_VALUE_UPDATED is defined in const.py. For consistency with the existing codebase pattern, these event constants should be moved to const.py alongside EVENT_VALUE_UPDATED.",
"severity": "minor",
"... | 1 |
python | # Legacy name, left for integrations.
FileMode = Mode
def supports_feature(target_versions: Set[TargetVersion], feature: Feature) -> bool:
return all(feature in VERSION_TO_FEATURES[version] for version in target_versions)
def find_pyproject_toml(path_search_start: Tuple[str, ...]) -> Optional[str]:
"""Find ... | Review this code and list any quality issues. | [
{
"issue": "Lets add some logging (atleast @ debug level) so we at least tell the user why their config is not being picked up.\r\n- Could save hours of debugging for someone one day\r\n- Silent swallowing at debug level is evil",
"severity": "critical",
"line": 26
}
] | 1 |
python | def exec_kedro_target(context, command):
"""Execute Kedro target."""
split_command = command.split()
cmd = [context.kedro] + split_command
context.result = run(cmd, env=context.env, cwd=str(context.root_project_dir))
@when("I execute the installed project package")
def exec_project(context):
"""Ex... | Review this code and list any quality issues. | [] | 0 |
python | 'title': 'Best Tom Hanks Movies',
'description': 'We look at the filmography of America\'s Dad, as we count down our list of the best Tom Hanks movies.',
'thumbnail': r're:^https?://.*\.jpg$',
'duration': 1468.592
},
}, {
'url': 'https://www.rottentomatoes.com/m/t... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n```\r\nthen everything from this point and below could be replaced with:\r\n```py\r\n if video_id:\r\n video_data = traverse_obj(data, lambda _, v: v['publicId'] == video_id)\r\n if not video_data:\r\n raise ExtractorError('Unable to extra... | 1 |
python | def __init__(
self,
decimal_mob: DecimalNumber,
number_update_func: typing.Callable[[float], float],
suspend_mobject_updating: bool = False,
**kwargs: Any,
) -> None:
self.check_validity_of_input(decimal_mob)
self.number_update_func = number_update_func
... | Review this code and list any quality issues. | [
{
"issue": "It should not be necessary to add a docstring to this method, since the overriden `Animation.interpolate_mobject()` already has a docstring.\r\n```suggestion\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if not timestamp or not slack_signature:
raise HTTPException(status_code=400, detail="Missing Slack headers")
if not verify_slack_signature(body, timestamp, slack_signature):
raise HTTPException(status_code=403, detail="Invalid signature")
data = await request.json()
#... | Review this code and list any quality issues. | [] | 0 |
python | if not item_id:
return
formats, subtitles = self._download_media_selector(item_id)
return {
'id': item_id,
'formats': formats,
'subtitles': subtitles,
**traverse_obj(model, {
'title': ('title', {s... | Review this code and list any quality issues. | [
{
"issue": "Make traversal return first item found:\r\n```suggestion\r\n model = traverse_obj(next_data, (\r\n ..., 'contents', lambda _, v: v['type'] == 'video',\r\n 'model', 'blocks', lambda _, v: v['type'] == 'media',\r\n 'model', 'blocks', lambda _, v: v['type'] == 'm... | 1 |
python | from pydantic_ai.exceptions import ApprovalRequired
raise ApprovalRequired()
@sequential_toolset.tool
def call_second():
nonlocal integer_holder
assert integer_holder == 2
agent = Agent(
FunctionModel(call_tools_sequential), toolsets=[sequential_toolset], output_type=[str,... | Review this code and list any quality issues. | [
{
"issue": "I think we can revert this to the snapshot -- the `metadata` type doesn't allow `tool_call_id: None` anyway",
"severity": "minor",
"line": 26
}
] | 1 |
python | FAKE_SOCKET = BulbType(
bulb_type=BulbClass.SOCKET,
name="ESP01_SOCKET_03",
features=Features(
color=False, color_tmp=False, effect=False, brightness=False, dual_head=False
),
kelvin_range=KelvinRange(2700, 6500),
fw_version="1.0.0",
white_channels=2,
white_to_color_ratio=80,
)
F... | Review this code and list any quality issues. | [] | 0 |
python | Hook for any steps to run before the job/task starts
"""
instance.log_lifecycle("pre_run")
# Before task is started, ensure that job_event partitions exist
create_partition(instance.event_class._meta.db_table, start=instance.created)
def post_run_hook(self, instance, status):
... | Review this code and list any quality issues. | [
{
"issue": "This could throw a `ValueError` if the plugin returns invalid or out-of-spec json.",
"severity": "minor",
"line": 26
}
] | 1 |
python | tip_height : :class:`float`
The height of the tip.
include_numbers : :class:`bool`
Determines whether numbers are added to tick marks. The number of decimal places is determined
by the step size, this default can be overridden by ``decimal_number_config``.
label_direction : Union[:class:... | Review this code and list any quality issues. | [
{
"issue": "I think it'd make more sense if each of the lines were added to a VGroup and then arranged via `.arrange()`.\r\n\r\nHere's what it could look like:\r\n```py\r\nline_group = VGroup(l0, l1, l2, l3).arrange(DOWN, buff = 1)\r\nself.add(line_group)\r\n```\r\nThis would automate the effort of settting the... | 1 |
python | Set `device_map="auto"` to have 🤗 Accelerate automatically compute the most optimized `device_map`. For
more information about each option see [designing a device
map](https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map).
max_memory (`Dict`... | Review this code and list any quality issues. | [] | 0 |
python | # ========================== Rasterizer Camera Sensor ==========================
@register_sensor(RasterizerCameraOptions, RasterizerCameraSharedMetadata, CameraData)
class RasterizerCameraSensor(BaseCameraSensor):
"""
Rasterizer camera sensor using OpenGL-based rendering.
This sensor renders RGB images ... | Review this code and list any quality issues. | [
{
"issue": "Please use `is_` (or `has_`) prefix for boolean flags.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'season': 'Season 3',
'season_number': 3,
'episode': 'Episode 3',
'episode_number': 3,
'timestamp': 1747817300,
'upload_date': '20250521',
},
}, {
'url': 'https://budem.mave.digital/ep-12',
'md5': 'e1ce2780fcdb6f17821aa3ca3e8c919f',... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'thumbnail': r're:https://.+/storage/podcasts/.+\\.jpg',\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.