language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | "metavar": "UPLOAD_FOLDER",
"nargs": "?",
"default": "",
"const": "",
"help": "The path to the folder where uploaded files from Taipy GUI will be stored.",
},
}
__DEBUG_ARGS: Dict[str, Dict] = {
"--debug": {"dest": "taipy_debug", "help": "Turn on ... | Review this code and list any quality issues. | [
{
"issue": "can we not use the same `dest` with action: `store_false` ?",
"severity": "minor",
"line": 26
}
] | 1 |
python | block_group_size: int = 1
"""
The number of blocks to group together into a single parent block.
This has no affect on the number of parameters in the model and is only used to wrap groups
of blocks together with a single FSDP wrapper during training.
"""
alibi: bool = False
"""
If ``Tr... | Review this code and list any quality issues. | [
{
"issue": "I don't think \"amp_*\" is meaningful here. It seems like there should really be two options:\r\n- fp32, or\r\n- whatever type q and k are\r\n\r\nSo maybe change this to a flag called `rope_full_precision` or something?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import asyncio
# This external package needs to be installed. It is not included in crawlee.
from camoufox import AsyncNewBrowser # type: ignore[import-not-found]
from typing_extensions import override
from crawlee.browsers import BrowserPool, PlaywrightBrowserController, PlaywrightBrowserPlugin
from crawlee.playwr... | Review this code and list any quality issues. | [
{
"issue": "Could we ignore that check on the project level so that the example is cleaner?",
"severity": "minor",
"line": 4
}
] | 1 |
python | )
items.extend(self._data_from_dynamo_replace(response["Items"]))
return_value = []
if status:
for item in items:
if status and item["status"] == status:
return_value.append(item)
else:
return_value = items
return ... | Review this code and list any quality issues. | [] | 0 |
python | ----------
.. [1] W. H. Kruskal & W. W. Wallis, "Use of Ranks in
One-Criterion Variance Analysis", Journal of the American Statistical
Association, Vol. 47, Issue 260, pp. 583-621, 1952.
.. [2] https://en.wikipedia.org/wiki/Kruskal-Wallis_one-way_analysis_of_variance
Examples
--------
... | Review this code and list any quality issues. | [
{
"issue": "`_axis_nan_policy` also ensures `axis=-1`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert block.reward_chain_block.signage_point_index == 0
signage_point = original_challenge_hash
else:
signage_point = block.reward_chain_block.challenge_chain_sp_vdf.output.get_hash()
if passes_plot_filter(filter_prefix_bits, plot_id, original_challenge_hash, signage_point):
... | Review this code and list any quality issues. | [] | 0 |
python | def validate_mask(mask: Any, n: int) -> None:
if mask is None:
return
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... | Review this code and list any quality issues. | [
{
"issue": "The PR description states this is a breaking change that \"might result in unexpected mask annotations when the user input is of dtype float, or if one masks contains multiple unique integer values.\" However, this PR only adds a deprecation warning without actually changing behavior. The warning me... | 1 |
python | closedmin=True, closedmax=True, slidermin=None,
slidermax=None, dragging=True, valstep=None,
orientation='horizontal', initcolor='r',
track_color='lightgrey', handle_style=None, **kwargs):
"""
Parameters
----------
ax : Axes
... | Review this code and list any quality issues. | [
{
"issue": "I think this wording as a bit more concise:\r\n```suggestion\r\n The way to format the slider value. If a string, if must be in %-format.\r\n If a callable, it must have the signature ``valfmt(val: float) -> str``.\r\n If None, a `.ScalarFormatter` is used.\r\n```",
... | 1 |
python | from worst to best quality.
Potential fields:
* url The mandatory URL representing the media:
for plain file media - HTTP URL of this file,
for RTMP - RTMP URL,
for HL... | Review this code and list any quality issues. | [
{
"issue": "for consistency with above\r\n```suggestion\r\n The M3U8 media playlist data as a string,\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def from_data_uri(cls, data_uri: str) -> BinaryContent:
"""Create a `BinaryContent` from a data URI."""
prefix = 'data:'
if not data_uri.startswith(prefix):
raise ValueError('Data URI must start with "data:"')
media_type, data = data_uri[len(prefix) :].split(';base64,', 1)
... | Review this code and list any quality issues. | [
{
"issue": "Let's use `narrow_type` here to get an `BinaryImage` in case it's an image",
"severity": "minor",
"line": 26
}
] | 1 |
python | from_node=self.nodes[0],
utxo_to_spend=tx1a_utxo,
sequence=0,
fee=Decimal("0.1"),
)["new_utxo"]
tx2_hex = self.wallet.create_self_transfer_multi(
utxos_to_spend=[utxo1, utxo2, tx1b_utxo],
sequence=0,
amount_per_output=int(COIN * tx... | Review this code and list any quality issues. | [
{
"issue": "any reason not to use `assert_equal`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | DOMAIN,
SERVICE_GET_EVENTS,
service_data={
"entity_id": "calendar.calendar_1",
**service_data,
},
blocking=True,
return_response=True,
)
async def test_calendar_initial_color_valid(
hass: HomeAssistant,
entity_... | Review this code and list any quality issues. | [
{
"issue": "I don't think we need to assert this.",
"severity": "minor",
"line": 26
}
] | 1 |
python | info.update({
'description': info.get('description') or feed_data.get('description') or feed_data.get('longDescription'),
'uploader': publish_info.get('description'),
'uploader_id': publish_info.get('channel'),
'view_count': int_or_none(feed_data.get('medi... | Review this code and list any quality issues. | [
{
"issue": "Used by GenericIE for embed detection\r\n\r\nhttps://github.com/yt-dlp/yt-dlp/blob/88f20eff1b13f70d332ef97fc1be175271bec130/yt_dlp/extractor/generic.py#L1550-L1562",
"severity": "major",
"line": 26
}
] | 1 |
python | def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
content_data = self._search_json('contentData":', webpage, 'nascar_classics_content_data', video_id)
name = traverse_obj(content_data, ('input', 'name'))
description = st... | Review this code and list any quality issues. | [
{
"issue": "Can be simplified to a single `traverse_obj` call. m3u8 url extraction might as well be fatal\r\n```suggestion\r\n return {\r\n 'id': video_id,\r\n 'formats': self._extract_m3u8_formats(content_data['input']['src'], video_id),\r\n **traverse_obj(content_data, ... | 1 |
python | @pytest.fixture
async def client_with_logfire(temporal_env: WorkflowEnvironment) -> Client:
return await Client.connect(
f'localhost:{TEMPORAL_PORT}',
plugins=[PydanticAIPlugin(), LogfirePlugin()],
)
# Can't use the `openai_api_key` fixture here because the workflow needs to be defined at the ... | Review this code and list any quality issues. | [
{
"issue": "Let's make this an inline lambda as it's very simple",
"severity": "minor",
"line": 26
}
] | 1 |
python | from cognee import __version__ as cognee_version
from .get_search_type_tools import get_search_type_tools
from .no_access_control_search import no_access_control_search
from ..utils.prepare_search_result import prepare_search_result
logger = get_logger()
async def search(
query_text: str,
query_type: SearchT... | Review this code and list any quality issues. | [
{
"issue": "The bunny is right, in access control mode, the return value is a dict",
"severity": "critical",
"line": 26
}
] | 1 |
python | )
if scheme == 'socket':
# use 'path' as path to the socket… in this case
# the database number should be given in 'query'
connparams.update({
'connection_class': self.redis.UnixDomainSocketConnection,
'path': '/' + path,
})
... | Review this code and list any quality issues. | [] | 0 |
python | Examples
--------
.. manim:: ParallelLineExample
:save_last_frame:
class ParallelLineExample(ThreeDScene):
def construct(self):
self.set_camera_orientation(PI / 3, -PI / 4)
ax = ThreeDAxes((-5, 5), (-5, 5), (-5, 5), 10, 10,... | Review this code and list any quality issues. | [
{
"issue": "Huh. I don't know how I missed this one in PR #4068:\n```suggestion\n point: Point3DLike = ORIGIN,\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | hass: HomeAssistant,
service_data: dict[str, str],
error_msg: str,
) -> None:
"""Test listing events from the service call using the same start and end time."""
with pytest.raises(vol.error.MultipleInvalid, match=re.escape(error_msg)):
await hass.services.async_call(
DOMAIN,
... | Review this code and list any quality issues. | [
{
"issue": "We don't unittest things based on directly asserting on entity attributes. Make tests in terms of `state.attributes` only.",
"severity": "minor",
"line": 26
}
] | 1 |
python | part_size = 8388608
file_size = part_size * 2
self._run_multipart_test(part_size, file_size)
def test_put_multipart_multiple_parts_with_sse_deprecated(self):
s3_client = S3Client(AWS_ACCESS_KEY, AWS_SECRET_KEY)
with self.assertRaises(DeprecatedBotoClientException):
s3_cl... | Review this code and list any quality issues. | [
{
"issue": "Why do you return the last thing you do in a test case??? I thought you only used self.assertBlah()",
"severity": "minor",
"line": 26
}
] | 1 |
python | See https://github.com/redis/redis-py/issues/3912
"""
# b'\x80\x81\x82' is deliberately invalid UTF-8
binary_channel = b"\x80\x81\x82"
p = r.pubsub()
p.subscribe(binary_channel)
assert wait_for_message(p) is not None # consume subscribe ack
# force reconnect
... | Review this code and list any quality issues. | [
{
"issue": "`wait_for_message(p)` can return `None` on timeout; appending it and then indexing `messages[0][\"type\"]` will raise a `TypeError` and obscure the real failure. Consider asserting the returned message is not `None` (or directly asserting equality vs an expected subscribe/psubscribe message) before ... | 1 |
python | 'md5': 'c30fa18999c5880d156339f13c953a26',
'info_dict': {
'id': '1915774',
'display_id': 'misfits-magic-holiday-special',
'ext': 'mp4',
'title': 'Misfits & Magic Holiday Special',
'description': 'The magical misfits spend Christmas break at Gowpenny, w... | Review this code and list any quality issues. | [
{
"issue": "remove `id` from this function.\r\nYou are calling it once anyways that too with `None` hardcoded.\r\n```suggestion\r\n def _login(self):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | return self.node(s, fg(40 + GREEN))
def iyellow(self, *s: object) -> colored:
return self.node(s, fg(40 + YELLOW))
def iblue(self, *s: colored) -> colored:
return self.node(s, fg(40 + BLUE))
def imagenta(self, *s: object) -> colored:
return self.node(s, fg(40 + MAGENTA))
def ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \r\n try:\r\n return sys.stdin.isatty() and ITERM_PROFILE\r\n except AttributeError:\r\n pass\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
from .kaltura import KalturaIE
from .youtube import YoutubeIE
from ..utils import (
NO_DEFAULT,
determine_ext,
int_or_none,
parse_iso8601,
smuggle_url,
xpath_text,
)
class HeiseIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?heise\.de/(?:[^/]+/)+[^/]+... | Review this code and list any quality issues. | [
{
"issue": "isnt this wrong?\r\n```suggestion\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | kvs1 = await KeyValueStore.open()
await kvs1.drop()
kvs2 = await KeyValueStore.open()
assert kvs1 is not kvs2
async def test_get_set_value(key_value_store: KeyValueStore) -> None:
await key_value_store.set_value('test-str', 'string')
await key_value_store.set_value('test-int', 123)
await key_v... | Review this code and list any quality issues. | [] | 0 |
python | class RetiariiExperiment(Experiment):
def __init__(self, base_model: nn.Module, trainer: Union[Evaluator, BaseOneShotTrainer],
applied_mutators: List[Mutator] = None, strategy: BaseStrategy = None):
# TODO: The current design of init interface of Retiarii experiment needs to be reviewed.
... | Review this code and list any quality issues. | [
{
"issue": "Should call `dry_run_for_formated_search_space` here. Not sure whether every search space can be successfully formatted though.",
"severity": "major",
"line": 26
}
] | 1 |
python | # Copyright 2021-2024 Avaiga Private Limited
#
# 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 agree... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n\"\"\"# Exceptions raised by the `taipy.config^` package.\"\"\"\r\n```",
"severity": "minor",
"line": 12
}
] | 1 |
python | self.config_entry.state
is not config_entries.ConfigEntryState.SETUP_IN_PROGRESS
):
raise ConfigEntryError(
f"`async_config_entry_first_refresh` called when config entry state is {self.config_entry.state}, "
f"but should only be called in state {config_ent... | Review this code and list any quality issues. | [
{
"issue": "Make sure to set `last_exception` and `last_update_success`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | "'%s' refers to a ManyToManyField '%s', but "
"ManyToManyFields are not permitted in '%s'."
% (
option,
field_name,
option,
),
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n f\"but ForeignObjects are not permitted in {option!r}.\",\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | data = data.encode(encoding)
return content_from_data_and_mime_type(data, parts["mimetype"], parts.get("encoding", None))
def content_from_data_and_mime_type(data: bytes | str, mime_type: str | None, encoding: str | None = None) -> str:
if isinstance(data, bytes):
if not encoding:
import c... | Review this code and list any quality issues. | [
{
"issue": "avoid swallowing exceptions. the error log is not visible to users requesting the decode. uses of the method do not check the return value but they do catch exceptions.",
"severity": "minor",
"line": 26
}
] | 1 |
python | return super(StaticSids, cls).__new__(cls, sids=sids)
def _compute(self, arrays, dates, sids, mask):
my_columns = sids.isin(self.params['sids'])
return repeat_first_axis(my_columns, len(mask)) & mask
class StaticAssets(StaticSids):
"""
A Filter that computes True for a specific set of pre... | Review this code and list any quality issues. | [
{
"issue": "We can probably also add `StandardOutputs` and `PositiveWindowLengthMixin` to this term.",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert "你好" == resp.text
@pytest.fixture
def tool_calls_rsp():
function_rsps = [
Function(arguments='{\n"language": "python",\n"code": "print(\'hello world\')"}', name="execute"),
]
tool_calls = [
ChatCompletionMessageToolCall(type="function", id=f"call_{i}", function=f) for i, f in enumer... | Review this code and list any quality issues. | [] | 0 |
python | def _get_chunker(self, data_type: DataType, config: ChunkerConfig) -> BaseChunker:
"""Returns the appropriate chunker for the given data type.
:param data_type: The type of the data to chunk.
:type data_type: DataType
:param config: Config to initialize the chunker with.
:type c... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n DataType.JSON: JSONChunker,\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.gguf_writer.add_vision_use_gelu(True)
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
del bid # unused
if "multi_modal_projector" in name or "vision_model" in name:
# process vision tensors
if "positional_embeddi... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n self.gguf_writer.arch = gguf.MODEL_ARCH_NAMES[self.model_arch]\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import unified_timestamp
class BanByeBaseIE(InfoExtractor):
_API_BASE = 'https://api.banbye.com'
_CDN_BASE = 'https://cdn.banbye.com'
def _extract_playlist(self, playlist_id):
data = self._dow... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n _VALID_URL = r'https?://(?:www\\.)?banbye.com/(?:en/)?watch/(?P<id>\\w+)'\r\n```\r\nthere may be other queries in the URL. Better to take playlist_id from parse_url",
"severity": "minor",
"line": 26
}
] | 1 |
python | step = facefusion.choices.output_image_quality_range[1] - facefusion.choices.output_image_quality_range[0],
minimum = facefusion.choices.output_image_quality_range[0],
maximum = facefusion.choices.output_image_quality_range[-1],
visible = is_image(facefusion.globals.target_path)
)
OUTPUT_VIDEO_ENCODER_DROPDOWN ... | Review this code and list any quality issues. | [] | 0 |
python | some_looooooooong_module.SomeClass.some_looooooooooooooong_variable_name
)
# Make sure chaining assignments work.
first_item, second_item, third_item, forth_item = m["everything"] = (
some_looooooooong_module.some_looooooooooooooong_function_name(
first_argument, second_argument, third_argument
)
)
# ... | Review this code and list any quality issues. | [] | 0 |
python | if token in added_vocab:
if not added_tokens_decoder[i].normalized:
previous_token = token
token = tokenizer.decode(
tokenizer.encode(token, add_special_tokens=False)
)
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n self.gguf_writer.add_tokenizer_pre(\"default\")\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | """Base entity for Saunum Leil Sauna Control Unit integration."""
from __future__ import annotations
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
from .coordinator import LeilSaunaCoordinator
class Leil... | Review this code and list any quality issues. | [
{
"issue": "why is this needed and how is it related to the quality scale?",
"severity": "minor",
"line": 15
}
] | 1 |
python | AIBRIX_KV_CACHE_OL_L2_CACHE_NUM_ASYNC_WORKERS: int = 8
# Mock Connector
AIBRIX_KV_CACHE_OL_MOCK_USE_RDMA: bool = False
AIBRIX_KV_CACHE_OL_MOCK_USE_MPUT_MGET: bool = False
# RocksDB Env Vars
AIBRIX_KV_CACHE_OL_ROCKSDB_ROOT: str = os.path.expanduser(
os.path.join(os.path.expanduser("~"), ".k... | Review this code and list any quality issues. | [
{
"issue": "I kind of feel this fashion is a little bit conflict with `NCCL_IB_HCA` setting, however, their `:1` is port, but not gid. Let's stick with this way at this moment and consider whether need to do internal search or env auto replacement later.",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert len(resolved_data_files) == 1
def test_resolve_pattern_in_dataset_repository_returns_hidden_dir_only_if_requested(hub_dataset_repo_path):
with pytest.raises(FileNotFoundError):
resolve_pattern("data/*dummy_subdir/train.txt", hub_dataset_repo_path)
resolved_data_files = resolve_pattern("data/.du... | Review this code and list any quality issues. | [] | 0 |
python | 'id': 'MSUI14000816',
'ext': 'mp4',
'title': 'Backstage - 8. episode',
'description': 'md5:de6ca5d5a2d56849e4021f2bf2850df4',
'duration': 1320,
'series': 'Backstage',
'season_number': 1,
'episode_number': 8,
'episode': '8. e... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if not (nrk_id := traverse_obj(NRKTVIE._match_valid_url(urlh.url), 'id')):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | or self.outtmpl_dict['default'] == '-'))
compat = (
prefer_best
or self.params.get('allow_multiple_audio_streams', False)
or 'format-spec' in self.params.get('compat_opts', []))
return (
'best/bestvideo+bestaudio' if prefer_best
else 'bestvide... | Review this code and list any quality issues. | [] | 0 |
python | res = await AgentNodeExecution.prisma().update(
where={"id": node_exec_id},
data=_get_update_status_data(status, execution_data, stats),
include=EXECUTION_RESULT_INCLUDE,
)
if not res:
raise ValueError(f"Execution {node_exec_id} not found.")
return ExecutionResult.from_db(re... | Review this code and list any quality issues. | [
{
"issue": "unchecked code\r\n```suggestion\r\n update_data: AgentNodeExecutionUpdateInput = {\"executionStatus\": status}\r\n if status == ExecutionStatus.QUEUED:\r\n update_data[\"queuedTime\"] = now\r\n elif status == ExecutionStatus.RUNNING:\r\n update_data[\"startedTime\"] = now\r\n ... | 1 |
python | 'title': 'Isabella Arendt stiller op for De Konservative',
'description': 'Tidligere formand for Kristendemokraterne Isabella Arendt stiller op til folketingsvalget for Det Konservative Folkeparti. Men hvorfor netop de konservative? og hvordan harmonisere det med hendes ønske om en mere human udlændinge- og... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n info_data = self._search_nextjs_data(webpage, video_id)[\"props\"][\"pageProps\"][\"episodeDetails\"][0]\r\n\r\n return {\r\n 'id': str(info['id']),\r\n 'display_id': video_id,\r\n 'title': try_get(info, lambda x: x['title']['rendered'... | 1 |
python | if judge.prompt_template["type"] == "pairwise":
g1_winner, g1_user_prompt, g1_judgment = run_judge_pair(
question, answer_1, answer_2, judge, ref_answer, multi_turn=multi_turn
)
g2_winner, g2_user_prompt, g2_judgment = run_judge_pair(
question, answer_2, answer_1, judge, ... | Review this code and list any quality issues. | [] | 0 |
python | def intersects_path(self, other, filled=True):
"""
Return whether if this path intersects another given path.
If *filled* is True, then this also returns True if one path completely
encloses the other (i.e., the paths are treated as filled).
"""
return _path.path_interse... | Review this code and list any quality issues. | [
{
"issue": "Not checked, but what about CLOSEPOLY? That should also be sub sampled.",
"severity": "minor",
"line": 26
}
] | 1 |
python | Returns
-------
:class:`Mobject`
``self``
See Also
--------
:meth:`add_updater`
:meth:`get_updaters`
"""
if self.updating_suspended:
return self
for updater in self.updaters:
parameters = get_parameters(updater... | Review this code and list any quality issues. | [
{
"issue": "add `from typing import List` and then\r\n```suggestion\r\n def get_time_based_updaters(self) -> List[Callable]:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | target_versions: Set[TargetVersion] = field(default_factory=set)
line_length: int = DEFAULT_LINE_LENGTH
string_normalization: bool = True
is_pyi: bool = False
is_ipynb: bool = False
magic_trailing_comma: bool = True
experimental_string_processing: bool = False
python_cell_magics: Set[str] = ... | Review this code and list any quality issues. | [
{
"issue": "At this point I'm a little worried that we might hit some filesystem file name length limits. I assume that Python cell magics are also filesystem safe? can't contain slashes, colons, whatever isn't safe. Worst case we could hash 'em with blake2/3 or something.\r\n\r\nThe cache should fail gracefull... | 1 |
python | import pytest
from manim import *
from manim.opengl import *
from ..utils.testing_utils import get_scenes_to_test
from ..utils.GraphicalUnitTester import GraphicalUnitTester
with tempconfig({"use_opengl_renderer": True}):
class CircleTest(Scene):
def construct(self):
circle = OpenGLCircle().s... | Review this code and list any quality issues. | [
{
"issue": "If I had to guess, I'd think that this context here is actually not necessary. It *should* be enough to set the `use_opengl_renderer` flag only for `test_scene` below.",
"severity": "minor",
"line": 8
}
] | 1 |
python | self.pyscript_run(
"""
<py-script id="pys">
import asyncio
import js
from pyodide.ffi import to_js
async def coro(delay):
await asyncio.sleep(delay)
return(delay)
async def get_results():
... | Review this code and list any quality issues. | [
{
"issue": "this seems very obscure. What does it do and more importantly, why is it needed?",
"severity": "minor",
"line": 26
}
] | 1 |
python | config["frame_rate"] = 15
with tempfile.TemporaryDirectory() as tmpdir:
temp_path = Path(tmpdir)
tex_dir = temp_path / "tex"
tex_dir.mkdir(parents=True)
text_dir = temp_path / "text"
config["text_dir"] = text_dir
config["tex_dir"] = tex_dir
scene = scene_obje... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n np.savez_compressed(path / str(scene)), frame_data=data)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.interpreter = interpreter
def chat(self, query: str, reset: bool = True):
if reset:
self.interpreter.reset()
# return self.interpreter.chat(query, return_messages=True)
return self.interpreter.chat(query)
@staticmethod
def extract_function(query_respond: List, func... | Review this code and list any quality issues. | [
{
"issue": "maybe you can provide an data example of the query_respond here in the comment",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'description': strip_or_none(item_desc),
})
for resp in (initial_data.get('data') or {}).values():
name = resp.get('name')
if name == 'media-experience':
parse_media(try_get(resp, lambda x: x['data']['initialItem']['mediaItem'], dict))
... | Review this code and list any quality issues. | [
{
"issue": "this needs to be non-fatal -- use `traverse_obj`. as-is, this line will throw for UK users before the rest of the extraction code can be reached",
"severity": "major",
"line": 26
}
] | 1 |
python | torch.set_num_threads(4)
def tearDown(self):
torch.set_num_threads(self.threads)
@parameterized.expand(TEST_CASE_PATCHEMBEDDINGBLOCK)
@skipUnless(has_einops, "Requires einops")
def test_shape(self, input_param, input_shape, expected_shape):
net = PatchEmbeddingBlock(**input_param)
... | Review this code and list any quality issues. | [] | 0 |
python | if not title:
title = self._search_regex(
r'\bfilename="([^"]+)"', urlh.headers.get('Content-Disposition'),
'title', default=None)
formats.append({
# Use redirect URLs as download URLs in order to calculate
... | Review this code and list any quality issues. | [
{
"issue": "imo this just helps code readability\r\n```suggestion\r\n urlh = request_source_file(confirmed_source_url, 'confirmed source', data=b'')\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if not (len(job_stats) == 1 and job_stats[0]['trialJobStatus'] == 'SUCCEEDED'):
print('Experiment jobs did not all succeed. Status is:', job_stats, file=sys.stderr)
print('Trying to fetch trial logs.', file=sys.stderr)
for root, _, files in os.walk(os.path.join(exp_dir, 'trials')):
... | Review this code and list any quality issues. | [] | 0 |
python | Returns either a single response object (non-streaming) or an async iterator
yielding response stream events (streaming).
"""
assert self.openai_responses_impl is not None, "OpenAI responses not initialized"
result = await self.openai_responses_impl.create_openai_response(
re... | Review this code and list any quality issues. | [
{
"issue": "This call is using a long positional-arg list. With the recent addition of presence_penalty, it looks like `reasoning` and `max_output_tokens` are now swapped due to parameter order. Can we switch this call to keyword arguments (at least for the tail params)",
"severity": "minor",
"line": 26... | 1 |
python | token_ids = final_res.outputs[0].token_ids
log_probs = None
if sampling_params.logprobs is not None:
log_probs = [logprobs[token_ids[i]].logprob for i, logprobs in enumerate(final_res.outputs[0].logprobs)]
routed_experts = None
if self.config.enable_rollout_routing_replay:
... | Review this code and list any quality issues. | [
{
"issue": "This is equivalent to `num_preempted=num_preempted`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | writer = writer_cls(fps, **writer_kwargs)
_log.info('Animation.save using %s', type(writer))
if 'bbox_inches' in savefig_kwargs:
_log.warning("Warning: discarding the 'bbox_inches' argument in "
"'savefig_kwargs' as it may cause frame size "
... | Review this code and list any quality issues. | [
{
"issue": "Let's not make dynamic attributes, instead add `_supports_transparency` to the writer base class.\r\n\r\nI'm also a bit wary of using a property. This sounds like a static setting of the writer, but logically may depend on the file type and codec. I suggest to turn this into a function to communicat... | 1 |
python | if renamed_key in meta_model_state_dict:
if source_pattern is not None:
new_converter = copy.deepcopy(pattern_to_converter[source_pattern])
mapping = conversion_mapping.setdefault(renamed_key, new_converter)
else:
mapping = conversion_mapping.setde... | Review this code and list any quality issues. | [
{
"issue": "IDK exactly how well python handles this, but `mapping.add_tensor(renamed_key, original_key, source_pattern, tensor)` adds the reference to the tensor. convert creates new and then we can indeed clear the tensor that was in the `sorted_state_dict`. We should propably iterate by key and pop them when... | 1 |
python | )
def test_ctr_decrypt(self):
data = bytes_to_intlist(b'\x03\xc7\xdd\xd4\x8e\xb3\xbc\x1a*O\xdc1\x12+8Aio\xd1z\xb5#\xaf\x08')
decrypted = intlist_to_bytes(aes_ctr_decrypt(data, self.key, self.iv))
self.assertEqual(decrypted.rstrip(b'\x08'), self.secret_msg)
def test_ctr_encrypt(self):
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n data, intlist_to_bytes(self.key), authentication_tag, intlist_to_bytes(self.iv[:12]))\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | "{1}.".format(asset.symbol, asset.auto_close_date))
return False
return True
@api_method
@disallowed_in_before_trading_start(OrderInBeforeTradingStart())
def order(self,
asset,
amount,
limit_price=None,
stop_price=None,
... | Review this code and list any quality issues. | [
{
"issue": "We might want to say somewhere that passing `limit_price=N` is equivalent to (and mutually-exclusive with) passing `style=LimitOrder(N)`, with the same going for `stop_price` with `StopOrder(N)`, and with `StopLimitOrder` when both are passed.",
"severity": "minor",
"line": 26
}
] | 1 |
python | "id": tool_call.get("id"),
"call_id": tool_call.get("call_id", tool_call.get("id")),
"name": tool_call["function"]["name"],
"arguments": tool_call["function"]["arguments"],
"status": "completed",
... | Review this code and list any quality issues. | [
{
"issue": "Just above here, should the tools param be updated as well? Not sure what the expected signature is",
"severity": "minor",
"line": 26
}
] | 1 |
python | if not cls.suitable(url):
continue
yield cls._smuggle_origin_url(url, origin_url)
elif html_tag:
if html_tag == "div" and not glomex_player:
continue
if not video_id_html or not integration_html:
cont... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n video_id, integration = self._match_valid_url(url).group('id', 'integration')\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | :type logger: logging.Logger
:param cloud_trace_only: If True, only write trace to cosmosdb and skip local trace. Default is False.
:type cloud_trace_only: bool
:param credential: The credential object used to authenticate with cosmosdb. Default is None.
:type credential: Optional[object]
"""
co... | Review this code and list any quality issues. | [
{
"issue": "as offline sync, it's kind of wired to import this; i will move this inside this pr",
"severity": "major",
"line": 26
}
] | 1 |
python | import re
from .common import InfoExtractor
from ..utils import (
determine_ext,
extract_attributes,
int_or_none,
url_or_none,
)
class DLFBaseIE(InfoExtractor):
_VALID_URL_BASE = r'https?://(?:www\.)?deutschlandfunk\.de/'
_BUTTON_REGEX = r'(<button[^>]+alt="Anhören"[^>]+data-audio-diraid[^>]*>... | Review this code and list any quality issues. | [
{
"issue": "imo we can use an `ext` var to make things easier below\r\n```suggestion\r\n ext = determine_ext(url)\r\n\r\n```",
"severity": "minor",
"line": 25
}
] | 1 |
python | ),
None,
)
if valid_state:
# Remove the used state
oauth_states.remove(valid_state)
user_metadata["integration_oauth_states"] = oauth_states
self.supabase.auth.admin.update_user_by_id(
user_id, {... | Review this code and list any quality issues. | [
{
"issue": "See https://github.com/Significant-Gravitas/AutoGPT/pull/8283/files#r1827924084",
"severity": "minor",
"line": 26
}
] | 1 |
python | EventName = log.OnroadEvent.EventName
EVENT_TO_INT = EventName.schema.enumerants
class DriverCameraView(CameraView):
def _calc_frame_matrix(self, rect: rl.Rectangle):
base = super()._calc_frame_matrix(rect)
driver_view_ratio = 1.5
base[0, 0] *= driver_view_ratio
base[1, 1] *= driver_view_ratio
... | Review this code and list any quality issues. | [
{
"issue": "no circular references to self. this allows the widget's ref count to drop to 0 and deletes PubMaster and frees CameraView in `__del__`",
"severity": "minor",
"line": 26
}
] | 1 |
python | _, config_file_path = _get_model_path(hosted_model)
with open(config_file_path, "r", encoding="utf-8") as file:
config = json.load(file)
self._model_configs[hosted_model] = config
def get_engine(self, model: str) -> Optional[async_engine.AsyncThreadedEngine]:
"""Get the async en... | Review this code and list any quality issues. | [
{
"issue": "Let's introduce a static method `ServerContext.current()` to get the current scope of server context, as this is what people more often do. \r\n\r\nHere's a reference https://github.com/apache/tvm/blob/main/python/tvm/relax/block_builder.py#L154-L160.\r\n\r\nIn `__enter__` we can check there is no c... | 1 |
python | @functools.cached_property
def _preferred_lang(self):
"""
Returns a language code supported by YouTube for the user preferred language.
Returns None if no preferred language set.
"""
preferred_lang = self._configuration_arg('lang', ie_key='Youtube', casesense=True, default=['... | Review this code and list any quality issues. | [
{
"issue": "Why not just:\r\n```suggestion\r\n if cookies.get('__Secure-3PSID') or cookies.get('SOCS'):\r\n return\r\n self._set_cookie('.youtube.com', 'SOCS', 'CAI', secure=True) # accept all (required for mixes)\r\n```\r\n\r\nIf user has exported consent cookie, we should always obey... | 1 |
python | else:
live_status = 'not_live'
elif video_type == 'live':
if not data_json.get('live_started_at'):
return 'is_upcoming', ''
if not live_finished_at:
live_status = 'is_live'
else:
live_status = 'was_live'
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n self.write_debug(f'{content_code}: video_type={video_type}, live_status={live_status}')\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | mock_msg.new_obj = new_sensor
ufp.api.bootstrap.sensors = {new_sensor.id: new_sensor}
ufp.ws_msg(mock_msg)
await hass.async_block_till_done()
state = hass.states.get(entity_id)
assert state
assert (
state.attributes[ATTR_DEVICE_CLASS] == BinarySensorDeviceClass.GARAGE_DOOR.value
)
... | Review this code and list any quality issues. | [] | 0 |
python | rot = R.random(batch_size)
R_np = rot.as_matrix()
if batch_size == 1:
R_np = R_np[0]
d6 = R_to_rot6d(R_np)
R_recon = rot6d_to_R(d6)
np.testing.assert_allclose(
R_np, R_recon, rtol=1e-5, atol=1e-6, err_msg=f"NumPy round-trip failed for batch size {batch_size}"
)
@pytest.mark.p... | Review this code and list any quality issues. | [
{
"issue": "See my other review:\r\n* No need to do `.numpy()` anywhere\r\n* rather use our own `assert_allclose`\r\n* `tolerance` should be a global constant after the imports.\r\n* You need to jutify your tolerance threshold, why 1e-5 ? It is actually quite bad. And I possible, use `tol` instead of `atol` + `... | 1 |
python | subgraph = func
all_keys_inner = _MultiContainer(
subgraph.dsk, set(subgraph.inkeys), all_keys
)
sub_dsk = subgraph.dsk
deps: set[KeyType] = set()
converted_subgraph = convert_legacy_graph(sub_dsk, all_keys_inner)
for v in converted... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # referencing keys that are not part of the subgraph but are part of\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if len(history) == 0:
raise ValueError(
f"Could not find the trained results in {self.work_dir}. "
"Possibly the required training step was not completed."
)
builder = AlgoEnsembleBuilder(history, self.data_src_cfg_name)
builder.set_ensemble_metho... | Review this code and list any quality issues. | [
{
"issue": "do we need the logic below (including self.ensembler(pred_param=self.kwargs) ) when infer_files is empty list?\r\n\r\nare you sure self.ensembler() will not crash with an empty list? may be it's saver to write, \r\n\r\n```\r\nif len(infer_files) >0:\r\n self.ensembler(...)\r\n \r\n```",
"sever... | 1 |
python | _TESTS = [{
'url': 'https://vplayer.nbcsports.com/p/BxmELC/nbcsports_embed/select/9CsDKds0kvHI',
'info_dict': {
'id': '9CsDKds0kvHI',
'ext': 'mp4',
'description': 'md5:df390f70a9ba7c95ff1daace988f0d8d',
'title': 'Tyler Kalinoski hits buzzer-beater to lift ... | Review this code and list any quality issues. | [
{
"issue": "match the old regex as well just in case",
"severity": "minor",
"line": 26
}
] | 1 |
python | # The configuration is the name of the subdirectory of `bazel-out`.
if not obj_file.startswith("bazel-out/"):
return "unknown"
return str(obj_file.split("/")[1])
def _filter_compilation_database(file_path: str) -> None:
"""Filters out duplicate exec-configuration entries from the compilation
d... | Review this code and list any quality issues. | [
{
"issue": "Where you say \"covered there\", is it correct that you mean the \"target\" configuration? It may be hard for people to understand a target can be build in both \"exec\" and \"target\" configurations, you might consider saying something more like \"covered by \"target\" configuration\" to be explici... | 1 |
python | "waiter_delay": 30,
"waiter_max_attempts": 60,
"aws_conn_id": "aws_default",
}
class TestEmrServerlessStartApplicationTrigger:
def test_serialization(self):
application_id = "test_application_id"
waiter_delay = 30
waiter_max_attempts = 60
aws_conn_id... | Review this code and list any quality issues. | [] | 0 |
python | 'creator': 'Pilarmagenta',
'uploader': 'pilarmagenta',
'uploader_id': '6624846890674683909',
'live_status': 'is_live',
'concurrent_view_count': int,
},
'skip': 'Livestream',
}, {
'url': 'https://m.tiktok.com/share/live/7209423610325322522/?lang... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n get_quality = qualities(('SD1', 'SD2', 'HD1', 'pm_mt_video_720p60', 'FULL_HD1', 'pm_mt_video_1080p60', 'rtmp', 'ORIGION', 'hls'))\r\n```\r\nsince u never access the tuple directly",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
class TheHighWireIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?thehighwire\.com/ark-videos/(?P<id>[^/?#]+)'
_EMBED_URL = 'https://app.arkengine.com/embed/{id}'
_TESTS = [{
'url': 'https://thehighwire.com/ark-videos/the-deposition-of-stanley-plotkin/',
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\nfrom .common import InfoExtractor\r\nfrom ..utils import (\r\n clean_html,\r\n extract_attributes,\r\n url_or_none,\r\n)\r\nfrom ..utils.traversal import (\r\n find_element,\r\n require,\r\n traverse_obj,\r\n)\r\n\r\n```",
"severity": "major",
"line": 1
}... | 1 |
python | return None
path = os.path.join(session['chapters_dir'], file).replace("\\", "/")
f.write(f"file '{path}'\n")
if is_gui_process:
progress_bar = gr.Progress(track_tqdm=False)
ok = assemble_audio_chunks_worker(concat_list,... | Review this code and list any quality issues. | [
{
"issue": "Type mismatch in function call. The merged_audio variable is a Path object (from line 2218), but export_audio expects a string parameter (as defined on line 2041). This call should be export_audio(str(merged_audio), metadata_file, final_file) to match the pattern used on line 2214 and to match the f... | 1 |
python | if err:
raise e
@read_only.setter
@invalid_view_op
def read_only(self, value: bool):
self._set_read_only(value, True)
def pytorch(
self,
transform: Optional[Callable] = None,
tensors: Optional[Sequence[str]] = None,
num_workers: int = 1,
... | Review this code and list any quality issues. | [
{
"issue": "I am curious, how did we came up with this cache size? did we do a benchmarking or is it a known constant that proved to work best?",
"severity": "major",
"line": 26
}
] | 1 |
python | os.path.join(oneapi_root, 'version.txt'),
os.path.join(oneapi_root, 'compiler', 'latest', 'version.txt'),
os.path.join(oneapi_root, 'runtime', 'latest', 'version.txt'),
):
if os.path.exists(p):
with o... | Review this code and list any quality issues. | [
{
"issue": "Version range dictionary displayed incorrectly in error message. The error message displays the entire xpu_version_range dictionary object instead of formatted version strings. This makes the error message unclear to users. Consider formatting the range as a readable string like \"min version to max... | 1 |
python | 'release_timestamp': 1481126700,
'upload_date': '20211101',
}
}, {
# news
'url': 'https://www.nhk.or.jp/radio/player/ondemand.html?p=F261_01_3855109',
'skip': 'Expires on 2023-04-17',
'info_dict': {
'id': 'F261_01_3855109',
'ext': 'm4a',
... | Review this code and list any quality issues. | [
{
"issue": "I think it would be simpler and safer if we pass the whole `episode` dict to this method and deal with it inside\r\n```suggestion\r\n def _extract_extended_description(self, episode_id, episode):\r\n service, area = traverse_obj(episode, ('aa_vinfo2', {str}, {lambda x: (x or '').partition(... | 1 |
python | self._end_of_iter_handler = end_of_iter_handler
async def stream(
self, request_iterator, context=None, *args
) -> AsyncIterator['Request']:
"""
stream requests from client iterator and stream responses back.
:param request_iterator: iterator of requests
:param context:... | Review this code and list any quality issues. | [] | 0 |
python | if not isinstance(block.test_output, list):
block.test_output = [block.test_output]
output_index = 0
log.info(f"{prefix} Executing {len(block.test_input)} tests...")
prefix = " " * 4 + prefix
for mock_name, mock_obj in (block.test_mock or {}).items():
log.info(f"{prefix} mocking {mock_... | Review this code and list any quality issues. | [
{
"issue": "Why not `raise`? It's a test, shouldn't it fail?",
"severity": "critical",
"line": 26
}
] | 1 |
python | assert [factor_base[i].soln1 for i in range(15)] == \
[0, 0, 3, 7, 13, 0, 8, 19, 9, 43, 27, 25, 63, 29, 19]
assert [factor_base[i].soln2 for i in range(15)] == \
[0, 1, 1, 3, 12, 16, 15, 6, 15, 1, 56, 55, 61, 58, 16]
assert [factor_base[i].a_inv for i in range(15)] == \
[1, 1, 5, 7, 3, 5... | Review this code and list any quality issues. | [] | 0 |
python | self._vscode_enabled = any(
isinstance(plugin, VSCodeRequirement) for plugin in self.plugins
)
# Load mixins
FileEditRuntimeMixin.__init__(
self,
enable_llm_editor=config.get_agent_config().enable_llm_editor,
llm_registry=llm_registry,
)
... | Review this code and list any quality issues. | [
{
"issue": "I'm pretty sure that because the base security analyzer has a `set_event_stream` method this conditional will always be true.",
"severity": "critical",
"line": 26
}
] | 1 |
python | pattern = (
"Pipeline nodes must have unique names. The following node names "
"appear more than once:\n\nFree nodes:\n - a"
)
with pytest.raises(ValueError, match=re.escape(pattern)):
pipeline1 + new_pipeline
def test_conflicting_outputs(self):
"""Node ... | Review this code and list any quality issues. | [] | 0 |
python | --------
{_parquet_writer_example_doc}
"""
def __init__(self, where, schema, filesystem=None,
flavor=None,
version='2.6',
use_dictionary=True,
compression='snappy',
write_statistics=True,
use_deprecated_int96_time... | Review this code and list any quality issues. | [
{
"issue": "It's called `write_time_adjusted_to_utc` in C++ so let's use the same name here?",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'thumbnail': 'https://assets.deutschlandfunk.de/a595989d-1ed1-4a2e-8370-b64d7f11d757/512x512.jpg?t=1679173825412',
'uploader': 'Deutschlandfunk',
'series': 'Sport am Samstag',
'channel': 'deutschlandfunk'
}
}],
'params':... | Review this code and list any quality issues. | [
{
"issue": "Keys with `None` values can be omitted from tests\r\n\r\nLet the test_download script generate the info_dicts for you by only manually entering `url` and `id`, and then `ext` (if single media) or `playlist_count`/`playlist_mincount` (if playlist). The test will fail and output the rest of the dict f... | 1 |
python | url_fragment=f'{story_id}-url',
)
def _create_topic(
self,
topic_id: str,
canonical_story_refs: list[dict[str, str]],
name: str = 'Topic',
language_code: str = 'en',
) -> topic_models.TopicModel:
"""Creates and returns a TopicModel instance."""
re... | Review this code and list any quality issues. | [] | 0 |
python | from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateType
_LOGGER = logging.getLogger(__name__)
ICON = "mdi:train"
MONITORED_INFO = [ # Backward compatibility with older versions
"categoria",
"compOrarioArrivoZeroEffettivo",
"compOrarioPartenzaZeroEffettivo",
"destinazione",
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\nNOT_DEPARTED_STRING = \"Not departed yet\"\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'add_ie': ['BrightcoveNew'],
}, {
'url': 'https://tver.jp/corner/f0103888',
'only_matching': True,
}, {
'url': 'https://tver.jp/lp/f0033031',
'only_matching': True,
}]
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s'
_... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n video_id, video_type = self._match_valid_url(url).group('id', 'type')\r\n if type in {'episode', 'episodes', 'series'}:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def stop_service():
port = get_port_from_config()
if port is not None and is_port_in_use(port):
kill_exist_service(port)
message = f"Promptflow service stop in {port}."
else:
message = "Promptflow service is not started."
logger.debug(message)
print(message)
def show_servic... | Review this code and list any quality issues. | [
{
"issue": "what's the final message user will see?",
"severity": "minor",
"line": 26
}
] | 1 |
python | vectors = [cast_function(vector) for vector in vectors]
if container_mode:
inputs[field_to_store] = vectors # type: ignore
return
if isinstance(inputs, list):
for record, vector in zip(inputs, vectors):
if list_of_dicts:
record[fie... | Review this code and list any quality issues. | [
{
"issue": "Are we missing some info here in this last line of the doc string?",
"severity": "minor",
"line": 26
}
] | 1 |
python | self.boundary_copies = [
vmobject.copy().set_style(stroke_width=0, fill_opacity=0) for x in range(2)
]
self.add(*self.boundary_copies)
self.total_time: float = 0
self.add_updater(lambda m, dt: self.update_boundary_copies(dt))
def update_boundary_copies(self, dt: float) -... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n bounds = (0.0, draw_alpha)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'ext': 'mp4',
},
},
{
'url': 'https://videocampus.sachsen.de/category/video/Tutorial-zur-Nutzung-von-Adobe-Connect-aus-Veranstalter-Sicht/09d4ed029002eb1bdda610f1103dd54c/100',
'info_dict': {
'id': '09d4ed029002eb1bdda610f1103dd54c',
't... | Review this code and list any quality issues. | [
{
"issue": "isn't the second regex just `_search_meta`?\r\n```suggestion\r\n title = self._html_search_regex(\r\n (r'<h1>(?P<content>[^<]+)</h1>', *self._meta_regex('title')),\r\n webpage, 'title', group='content', fatal=False)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | login = self._download_json(
'https://api.laxarxames.cat/Authorization/SignIn', None, note='Logging in', headers={
'X-Tenantorigin': 'https://laxarxames.cat',
'Content-Type': 'application/json',
}, data=json.dumps({
'Username': username,
... | Review this code and list any quality issues. | [
{
"issue": "if adopting the site/API var names, convert camelCase/PascalCase var names to snake_case\r\n```suggestion\r\n video_id = self._match_id(url)\r\n if not self._TOKEN:\r\n self.raise_login_required()\r\n\r\n media_play_info = self._download_json(\r\n```",
"severity":... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.