language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
traverse_obj,
unified_timestamp,
)
class RTVSIE(InfoExtractor):
IE_NAME = 'stvr'
_VALID_URL = r'https?://(?:www\.)?(?:rtvs|stvr)\.sk/(?:radio|televizia)/archiv(?:/\d+)?/(?P<id>\d+)/?(?:[#?]|$)'
_TESTS = [{
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n IE_NAME = 'stvr'\r\n IE_DESC = 'Slovak Television and Radio (formerly RTVS)'\r\n```",
"severity": "minor",
"line": 12
}
] | 1 |
python | ... def cdf(self, x, *, a, b):
... return (np.cbrt(x) - a) / (b - a)
>>>
>>> MyUniformCube = stats.make_distribution(MyUniformCube())
>>> X = MyUniformCube(a=-2, b=2)
>>> Y = stats.Uniform(a=-2, b=2)**3
>>> X.support()
(-8.0, 8.0)
>>> np.isclose(X.cdf(2.1), Y.cdf(2.1))
np... | Review this code and list any quality issues. | [
{
"issue": "Sorry, I can't help myself. To the user, I think two lines will look simpler than four, even if it's mostly whitespace.\r\n```suggestion\r\n ... return ({\"a\": (0, np.inf), \"b\": (0, np.inf)},\r\n ... {\"mu\": (0, 1), \"nu\": (0, np.inf)})\r\n```",
"severity": "mi... | 1 |
python | 'url': 'https://jable.tv/categories/roleplay/',
'only_matching': True,
}, {
'url': 'https://jable.tv/tags/girl/',
'only_matching': True,
}]
def _real_extract(self, url):
playlist_id = self._match_id(url)
webpage = self._download_webpage(url, playlist_id)
def... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n for player_url in orderedSet(re.findall(\r\n r'href=\"(https://jable.tv/videos/[\\w-]+/?)\"',\r\n self._download_webpage(url, playlist_id, query={\r\n 'mode': 'async',\r\n 'from': pag... | 1 |
python | async def get_shard_download_status(
self,
) -> AsyncIterator[tuple[Path, RepoDownloadProgress]]:
async for path, status in self.shard_downloader.get_shard_download_status():
yield path, status
async def get_shard_download_status_for_shard(
self, shard: ShardMetadata
) -... | Review this code and list any quality issues. | [] | 0 |
python | def _async_get_entry(call: ServiceCall) -> MealieConfigEntry:
"""Get the Mealie config entry."""
config_entry_id: str = call.data[ATTR_CONFIG_ENTRY_ID]
if not (entry := call.hass.config_entries.async_get_entry(config_entry_id)):
raise ServiceValidationError(
translation_domain=DOMAIN,
... | Review this code and list any quality issues. | [
{
"issue": "You now repeat the same `service.async_get_config_entry(...)` call in every service handler. Consider reintroducing a small local helper (wrapping `service.async_get_config_entry`) to centralize the lookup and keep the service functions focused on their core behavior (and to make future changes to e... | 1 |
python | # Make sure is_file actually returns True
self.assertTrue(p.is_file())
path = Path(f"__BLACK_STDIN_FILENAME__{p}")
expected = Path(p)
black.reformat_one(
path,
fast=True,
write_back=black.WriteBack.YES,
mode=... | Review this code and list any quality issues. | [
{
"issue": "This line should be outside the try-except to ensure it's executed.",
"severity": "minor",
"line": 26
}
] | 1 |
python | }
assert_action_trace(expected_trace)
@pytest.mark.parametrize(
"timeout_param", [0, "{{ 0 }}", {"minutes": 0}, {"minutes": "{{ 0 }}"}]
)
async def test_wait_template_with_zero_timeout(
hass: HomeAssistant, caplog: pytest.LogCaptureFixture, timeout_param: int | str
) -> None:
"""Test the wait template... | Review this code and list any quality issues. | [
{
"issue": "This change converts valid Python 3 syntax to deprecated Python 2 syntax. In Python 3, multiple exceptions must be caught using parentheses: `except (ExceptionA, ExceptionB):`. The Python 2 syntax `except ExceptionA, ExceptionB:` is not valid in Python 3 and will cause a syntax error. This line shou... | 1 |
python | def argument_parsing(notebook=False, notebook_args=None):
parser = argparse.ArgumentParser()
parser.add_argument(
"--datasets",
nargs="+",
required=True,
help="""
Multiple datasets can be passed to set different options.
For example, run as:
./check_da... | Review this code and list any quality issues. | [] | 0 |
python | assert len(ds) == 20
for i in range(20):
target = 2 if i % 2 == 0 else 3
check_target_array(ds, i, target)
def test_inplace_transform_bug(local_ds_generator):
@deeplake.compute
def construct(sample_in, sample_out):
sample_out.append({"positive": [1, 2, 3], "negative": [4, 5, 6]})
... | Review this code and list any quality issues. | [] | 0 |
python | from __future__ import annotations
from contextlib import suppress
from datetime import timedelta
from typing import Annotated, Any, Callable
from pydantic import PlainSerializer, TypeAdapter, ValidationError, WrapValidator
"""Utility types for Pydantic models."""
def _timedelta_to_ms(td: timedelta | None) -> floa... | Review this code and list any quality issues. | [
{
"issue": "We could be more strict and require float, but I have a feeling, that None could be used for something connected with defaults somewhere in code???",
"severity": "minor",
"line": 12
}
] | 1 |
python | @pytest.mark.redismod
def test_syndump(client):
definition = IndexDefinition(index_type=IndexType.HASH)
client.ft().create_index(
(TextField("title"), TextField("body")), definition=definition
)
client.ft().synupdate("id1", False, "boy", "child", "offspring")
client.ft().synupdate("id2", Fa... | Review this code and list any quality issues. | [
{
"issue": "Just an idea, would it be relevant to also query the `first_name` without decoding, to show that it looks different?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # current version is published already
count = 3
requests_mock.get(
'https://registry.hub.docker.com/v2/repositories/jinaai/jina/tags',
text=json.dumps(
{
'count': count,
'next': 'abc',
'previous': 'def',
'results': ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'uses', ['jinaai://jina-ai/DummyExecutor']\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # 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, software distributed under the... | Review this code and list any quality issues. | [
{
"issue": "Can't we remove this property? We already have the string representation.",
"severity": "major",
"line": 26
}
] | 1 |
python | "e",
]
# preserve me
)
func([x for x in "short line"])
func([x for x in "long line long line long line long line long line long line long line"])
func([x for x in [x for x in "long line long line long line long line long line long line long line"]])
func({"short line"})
func({"long line", "long long line", "l... | Review this code and list any quality issues. | [
{
"issue": "Also test a dict comprehension for completeness (like the one in cache.py).",
"severity": "major",
"line": 26
}
] | 1 |
python | for dimension, distinct_values in values_per_dimension.items():
if len(distinct_values) == 1:
uninteresting.add(dimension)
return uninteresting
def collect_data(tag: str, binary_dir: Path, pytest_opts: str):
"""Executes the specified test using the provided firecracker binaries"""
bin... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n os.rename(\"test_results\", tag)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'description': 'Η πρώτη ελληνική εκπομπή με θεματολογία αποκλειστικά γύρω από το ίντερνετ.',
'title': 'Το δίκτυο',
},
'playlist_mincount': 9,
}]
def _extract_episode(self, episode):
codename = try_get(episode, lambda x: x['Codename'], compat_str)
title = episode.get(... | Review this code and list any quality issues. | [
{
"issue": "You dont have to change this, but FYI:\r\n\r\n`dict_get(P, (a, b))` => `traverse_obj(P, a, b)`\r\n`try_get(P, (lambda x: x[a][b], lambda x: x[c][d]), t)` => `traverse_obj(P, (a, b), (c, d), expected_type=t)`",
"severity": "minor",
"line": 26
}
] | 1 |
python | if not self._check_process_alive():
return
save_info = (state_dict, path)
self.save_queue.put((save_info, DecoupledEvent.SAVE_EVENT))
def commit(self, info: CheckpointCommitInfo):
# Use proper validation instead of assert (assert is disabled with python -O)
if info != s... | Review this code and list any quality issues. | [
{
"issue": "I think it is better to add an assert that `self.checkpoint_size.gb_size() is not None` after line 180.",
"severity": "minor",
"line": 26
}
] | 1 |
python | total_elements = grad.numel()
start = self.grad_start_offset[i][partition_id][key]
num_elements = min(total_elements - start,
self.partition_size[i] - self.grad_partition_insertion_offset[i][partition_id][key])
if not pg_correctness_test:
... | Review this code and list any quality issues. | [] | 0 |
python | SERVICE_ADD_TORRENT,
full_service_data,
blocking=True,
)
client.add_torrent.assert_called_once_with(expected_torrent, **kwargs)
async def test_add_torrent_service_invalid_path(
hass: HomeAssistant,
mock_transmission_client: AsyncMock,
mock_config_entry: MockConfigEntry... | Review this code and list any quality issues. | [] | 0 |
python | speaker=speaker,
voice_dir=pth_voice_dir,
**fine_tuned_params
)
del result
msg = f"Saved file: {pth_voice_file}"
print(msg)
return True
else:
... | Review this code and list any quality issues. | [] | 0 |
python | @parameterized.expand([
('target', 153000.0), ('delta', 50000.0)
])
def test_capital_changes_daily_mode(self, change_type, value):
sim_params = factory.create_simulation_parameters(
start=pd.Timestamp('2006-01-03', tz='UTC'),
end=pd.Timestamp('2006-01-09', tz='UTC')
... | Review this code and list any quality issues. | [] | 0 |
python | # Email must be skipped
# https://avatars.githubusercontent.com/apify does not get robots.txt, but is correct for the crawler.
assert visited == {str(server_url / 'problematic_links'), 'https://avatars.githubusercontent.com/apify'}
# The budplaceholder.com does not exist.
assert failed == {
'ht... | Review this code and list any quality issues. | [] | 0 |
python | @pytest.mark.parametrize(
"starter, repo",
[
("spaceflights-pandas", "https://github.com/kedro-org/kedro-starters.git"),
(
"git+https://github.com/fake/fake.git",
"https://github.com/fake/fake.git",
),
],
)
def test_inva... | Review this code and list any quality issues. | [] | 0 |
python | {
'url': 'https://www.1tv.ru/live',
'info_dict': {
'id': 'live',
'ext': 'mp4',
'title': 'ПЕРВЫЙ КАНАЛ ПРЯМОЙ ЭФИР СМОТРЕТЬ ОНЛАЙН',
'is_live': True,
},
},
]
def _real_extract(self, url):
display_... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n```\r\nNo longer necessary with 7af6d81f35aea8832023daa30ada10e6673a0529",
"severity": "minor",
"line": 26
}
] | 1 |
python | count = 0
for count, entry in enumerate(extract_thread(continuation_renderer.get('contents') or {})):
yield entry
continuation = self._extract_continuation(continuation_renderer)
if count == 0:
if not parent:
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n renderer = next(filter(\r\n lambda x: x.get('sectionIdentifier') == 'comment-item-section',\r\n traverse_obj(contents, (..., 'itemSectionRenderer'), default={})), None)\r\n```\r\nor, maybe just this since there isn't much point in using filt... | 1 |
python | self._prefer_source(formats)
view_count = stream.get('viewers')
timestamp = unified_timestamp(stream.get('createdAt'))
sq_user = try_get(gql, lambda x: x[1]['data']['user'], dict) or {}
uploader = sq_user.get('displayName')
description = try_get(
sq_user, lambda x: ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'thumbnails': self._get_thumbnails(thumbnail),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | class Mx3BaseIE(InfoExtractor):
_MX3_DOMAIN = None
def _real_extract(self, url):
track_id = self._match_id(url)
webpage = self._download_webpage(url, track_id)
json = self._download_json(f'https://{self._MX3_DOMAIN}/t/{track_id}.json', track_id)
artists = []
if json.get... | Review this code and list any quality issues. | [
{
"issue": "I think all formats should be non-fatal\r\n```suggestion\r\n urlh = self._request_webpage(\r\n HEADRequest(fmt['url']), track_id, fatal=False, expected_status=404,\r\n note=f'Checking for format {fmt[\"format_id\"]}')\r\n```",
"severity": "minor",
"li... | 1 |
python | with open(answer_file, "a") as fout:
fout.write(json.dumps(question.to_dict()) + "\n")
def category_merge(row):
id = row["uid"]
input_category = row["category_tag"] if "category_tag" in row else {}
cache_category = CACHE_DICT[id]["category_tag"] if id in CACHE_DICT else {}
output_category ... | Review this code and list any quality issues. | [] | 0 |
python | response_time_ms=response_time,
details="Connection successful",
)
except Exception as e:
response_time = int((time.time() - start_time) * 1000)
return ComponentHealth(
status=HealthStatus.UNHEALTHY,
provider="unknown",
... | Review this code and list any quality issues. | [
{
"issue": "(note to self) we can create a protocol with `health_check` method for all components here",
"severity": "minor",
"line": 26
}
] | 1 |
python | def get_nadir(self):
return self.get_edge_center(IN)
def length_over_dim(self, dim):
return self.reduce_across_dimension(
np.max, np.max, dim
) - self.reduce_across_dimension(np.min, np.min, dim)
def get_coord(self, dim, direction=ORIGIN):
"""Meant to generalize ``g... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \"\"\"Returns the point, where the stroke that surrounds the :class:`~.Mobject` starts.\"\"\"\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _real_extract(self, url):
video_id = urllib.parse.unquote(self._match_id(url))
webpage = self._download_webpage(url, video_id)
data = self._search_json(
r'window\.ltvEmbedPayload\s*=', webpage, 'embed json', video_id)
embed_type = traverse_obj(data, ('source', 'name', {st... | Review this code and list any quality issues. | [
{
"issue": "could we do this instead?\r\n```suggestion\r\n _VALID_URL = r'https?://replay\\.lsm\\.lv/[^/?#]+/(?:ieraksts|statja)/[^/?#]+/(?P<id>\\d+)'\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from . import PortainerConfigEntry
from .const import DOMAIN
from .coordinator import PortainerContainerData, PortainerCoordinator
from .entity import PortainerContainerEntity, PortainerCoordinatorData
@dataclass(frozen=True, kw_only=True)
class PortainerSwitchEntityDescription(SwitchEntityDescription):
"""Class ... | Review this code and list any quality issues. | [
{
"issue": "The docstring \"Decorator to perform actions. And action!\" uses an informal, playful tone that is inconsistent with the professional documentation style used throughout the rest of the integration. Consider revising to something more descriptive and professional, such as \"Decorate async functions ... | 1 |
python | res_not_sorted = np.unique([1, 1], sorted=False, **{arg: True})
res_sorted = np.unique([1, 1], sorted=True, **{arg: True})
# The following should fail without first sorting `res_not_sorted`.
for arr, expected in zip(res_not_sorted, res_sorted):
assert_array_equal(arr, expected)
... | Review this code and list any quality issues. | [
{
"issue": "The original is easier to read and understand. The new line is also a touch long.",
"severity": "minor",
"line": 26
}
] | 1 |
python | uvm_plain.add_net_iface()
uvm_plain.start()
# Wait for microvm to boot
base_snapshot = uvm_plain.snapshot_diff()
uvm_plain.resume()
# Run command to dirty some pages
uvm_plain.ssh.check_output("sync")
snapshot_diff = uvm_plain.snapshot_diff()
snapshot_merged = snapshot_diff.rebase_sn... | Review this code and list any quality issues. | [] | 0 |
python | # This file is automatically picked by pytest
# while running tests. So, that each test is
# run on difference temporary directories and avoiding
# errors.
from __future__ import annotations
try:
import readline # required to prevent a segfault on Python 3.10
except ModuleNotFoundError: # windows
pass
impo... | Review this code and list any quality issues. | [
{
"issue": "A link to the open issue is better https://github.com/moderngl/moderngl/issues/517\r\n```suggestion\r\n # https://github.com/moderngl/moderngl/issues/517\r\n import readline # required to prevent a segfault on Python 3.10\r\n```",
"severity": "critical",
"line": 10
}
] | 1 |
python | 'start_time': 1696867320,
'title': 're:^언제 어디서나! KBS 뉴스 24 [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
'description': 'md5:6ad419c0bf2f332829bda3f79c295284',
'thumbnail': r're:^https?://.*\.(jpg|jpeg|png)',
'like_count': int,
},
}, {
'url': 'https:... | Review this code and list any quality issues. | [
{
"issue": "could inline `playback_info`\r\n```suggestion\r\n 'formats': self._extract_m3u8_formats(\r\n traverse_obj(data, ('playbackBody', {json.loads}, 'media', 0, 'path')), video_id, live=True),\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | alpha: float,
) -> "Transform":
submobject.interpolate(starting_submobject, target_copy, alpha, self.path_func)
return self
class ReplacementTransform(Transform):
"""Replace the mobject with target_mobject (like Transform does), and shows the target_mobject (whereas Transform shows the mobject... | Review this code and list any quality issues. | [
{
"issue": "This example seems like a little excessive just to highlight the difference between the two animations. Plus, writing the latex and the animations would add a significant amount of time needed to build the docs. \r\n\r\nI think it could be be done neatly using squares.",
"severity": "minor",
... | 1 |
python | url = compat_urlparse.urlunparse(
compat_urlparse.urlparse(url)._replace(netloc='www.youtube.com'))
compat_opts = self.get_param('compat_opts', [])
def get_mobj(url):
mobj = self._url_re.match(url).groupdict()
mobj.update((k, '') for k, v in mobj.items() if v is None... | Review this code and list any quality issues. | [
{
"issue": "Is it possible for us to check this from the cookies?",
"severity": "minor",
"line": 26
}
] | 1 |
python | _GEO_BYPASS = False
_AUS_AGES = {
'G': 0,
'PG': 15,
'M': 15,
'MA': 15,
'MA15+': 15,
'R': 18,
'X': 18,
}
def _real_extract(self, url):
content_id = self._match_id(url)
data = self._download_json(
'https://10.com.au/api/v1/v... | Review this code and list any quality issues. | [
{
"issue": "These would be added if they weren't in the query params of the original URL. Is that what is wanted? It's not the same semantics as the former `replace()` formula.",
"severity": "minor",
"line": 26
}
] | 1 |
python | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import try_get
class ThetaIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?theta\.tv/(?P<id>[a-z0-9]+)'
_TESTS = [{
'url': 'https://www.theta.tv/davirus',
'info_dict': {
'id'... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'url': 'https://www.theta.tv/mst3k',\r\n 'skip': 'The live may have ended',\r\n```",
"severity": "minor",
"line": 20
}
] | 1 |
python | pytest.raises(ValueError, match="Length of color lookup 1"),
), # multiple detections; custom lookup; wrong length
],
)
def test_resolve_color_idx(
detections: Detections,
detection_idx: int,
color_lookup: ColorLookup | np.ndarray,
expected_result: int | None,
exception: Exception,
) ->... | Review this code and list any quality issues. | [] | 0 |
python | y_n_classes = y.shape[1] if hasattr(y, "shape") else len(y[0])
if n_classes != y_n_classes:
raise ValueError(
"classes {0} mismatch with the labels {1} found in the data".format(
classes, unique_labels(y)
)
)
if y_type in ("binary"... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # Use NumPy to construct the sparse matrix of one-hot labels\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # coding: utf-8
from __future__ import unicode_literals
import re
import base64
import calendar
import datetime
from .common import InfoExtractor
from ..utils import (
ExtractorError,
update_url_query,
clean_html,
unified_timestamp,
)
from ..compat import compat_urllib_parse
class RadikoBaseIE(InfoE... | Review this code and list any quality issues. | [
{
"issue": "If these are not expected to change between runs, you can cache them in `self._downloader.cache`. See soundcloud/youtube for example",
"severity": "major",
"line": 21
}
] | 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 | else:
coeff2[d4] = factor(_coeff2[b]).match(d4**2)[d4]
self.rn = {'n':coeff2[d4], 'a4':coeff2[c4], 'd4':coeff2[a4]}
self.rn['c4'] = coeff1[a4]
self.rn['b4'] = point
return True
return False
def _get_general_solution(self, *, simplify_flag: bo... | Review this code and list any quality issues. | [
{
"issue": "This class should be added to `doc/src/modules/solvers/ode.rst`. Please check how it looks in the docs build because I think maybe the unescaped ascii-mathematics here might be problematic:\nhttps://docs.sympy.org/latest/contributing/documentation-style-guide.html",
"severity": "critical",
"... | 1 |
python | msg = f'{os.path.basename(model)} added to the custom models list'
state['type'] = 'success'
state['msg'] = msg
show_alert(state)
return gr.update(value=None), update_gr_custom... | Review this code and list any quality issues. | [] | 0 |
python | """
A structured pruning algorithm that prunes the filters with the smallest
importance approximations based on the first order taylor expansion on the weight.
Molchanov, Pavlo and Mallya, Arun and Tyree, Stephen and Frosio, Iuri and Kautz, Jan,
"Importance Estimation for Neural Network Pruning", CVPR 2... | Review this code and list any quality issues. | [
{
"issue": "what if the filters' sizes are different?",
"severity": "minor",
"line": 26
}
] | 1 |
python | @patch('pytorch_lightning.loggers.neptune.neptune')
def test_neptune_existing_experiment(neptune):
logger = NeptuneLogger(experiment_id='TEST-123')
neptune.Session.with_default_backend().get_project().get_experiments.assert_called_once_with(id='TEST-123')
experiment = logger.experiment
assert logger.e... | Review this code and list any quality issues. | [] | 0 |
python | '/usr/local/cuda/version.txt',
):
if os.path.exists(p):
with open(p, 'r', encoding='utf-8', errors='ignore') as f:
version_out = f.read()
break
elif os.name == 'nt':
cuda_path = os... | Review this code and list any quality issues. | [
{
"issue": "The has_nvidia_gpu_pci function returns True if nvidia-smi command exists, without actually checking if it works or if GPUs are detected. This creates redundancy with has_working_cuda which already runs nvidia-smi -L. Consider removing the nvidia-smi check from this function since has_working_cuda a... | 1 |
python | class Transform(Animation):
def __init__(
self,
mobject: Optional[Mobject],
target_mobject: Optional[Mobject] = None,
path_func: Optional[Callable] = None,
path_arc: float = 0,
path_arc_axis: np.ndarray = OUT,
replace_mobject_with_target_in_scene: bool = False... | Review this code and list any quality issues. | [
{
"issue": "Could you add type strings for these properties?",
"severity": "minor",
"line": 26
}
] | 1 |
python | :param project_scope: The scope of the Azure AI project.
It contains subscription id, resource group, and project name.
:type project_scope: dict
:param credential: The credential for connecting to Azure AI project.
:type credential: ~azure.core.credentials.TokenCredential
:return: Whether or no... | Review this code and list any quality issues. | [
{
"issue": "Hmmm, we call it a score, but the value is boolean?",
"severity": "minor",
"line": 26
}
] | 1 |
python | "second_per_grid_ts",
"audio_feature_lengths",
"use_audio_in_video",
},
)
if any(
v
for k, v in kwargs.items()
if k not in {"image_grid_thw", "mm_token_type_ids"}
):
raise NotImplementedError(
... | Review this code and list any quality issues. | [
{
"issue": "I don't understand this comment.\n\nWill `mm_token_type_ids` only exist in v5 and we keep `kwargs` empty otherwise because `get_rope_index` would error in v4 if we explicitly passed the `None` value?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import numpy as np
from manim import NumberLine
def test_unit_vector():
"""Check if the magnitude of unit vector along
the NumberLine is equal to its unit_size."""
axis1 = NumberLine(unit_size=0.4)
axis2 = NumberLine(x_range=[-2, 5, 1], length=12)
for axis in (axis1, axis2):
assert np.lin... | Review this code and list any quality issues. | [
{
"issue": "Don't think you need to specify the step size\r\n```suggestion\r\n axis2 = NumberLine(x_range=[-2, 5], length=12)\r\n```",
"severity": "minor",
"line": 10
}
] | 1 |
python | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import mlflow
import shutil, os, pickle, tempfile, codecs, pickle
from pathlib import Path
from datetime import datetime
from ..utils.objm import FileManager
from ..log import get_module_logger
logger = get_module_logger("workflow", "I... | Review this code and list any quality issues. | [
{
"issue": "Object is not necessary in Python3",
"severity": "minor",
"line": 14
}
] | 1 |
python | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import jwt
from promptflow.core._connection_provider._utils import get_arm_token, get_token
from ._token_cache import ArmTokenCache
def... | Review this code and list any quality issues. | [
{
"issue": "NIT: Use absolute import to align with other imports.",
"severity": "minor",
"line": 9
}
] | 1 |
python | title=MOCK_ADAPTER_NAME,
domain=DOMAIN,
data={
CONF_IP_ADDRESS: MOCK_ADAPTER_IP,
CONF_PORT: MOCK_ADAPTER_PORT,
},
options={
CONF_SCAN_INTERVAL: 30,
},
unique_id=MOCK_ADAPTER_MAC,
entry_id=MOCK_CONFIG_ENTRY_ID,
)
@pytest.fi... | Review this code and list any quality issues. | [
{
"issue": "`async_disconnect` is patched with a bare `AsyncMock()`, which will default to returning another mock when awaited. Since callers treat `async_disconnect()` as returning `None`, set the mock's `return_value` to `None` to better match the real method and avoid confusing return values in future assert... | 1 |
python | flow_order
The order in which submobjects fill the grid. Can be one of the following values:
"rd", "dr", "ld", "dl", "ru", "ur", "lu", "ul". ("rd" -> fill rightwards then downwards)
Returns
-------
Mobject
The mobject.
NOTES
-----
..... | Review this code and list any quality issues. | [
{
"issue": "Doesn't :attr: actually refer to attributes (`self.cols`) instead of keyword arguments? It should probably be changed to reflect that.\r\n\r\n```suggestion\r\n If ``rows`` and ``cols`` are too small to fit all submobjects.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | was_already_handled: Annotated[bool, Field(alias='wasAlreadyHandled')]
@docs_group('Data structures')
class UnprocessedRequest(BaseModel):
"""Represents an unprocessed request."""
model_config = ConfigDict(populate_by_name=True)
unique_key: Annotated[str, Field(alias='requestUniqueKey')]
url: Annota... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \"\"\"Internal representation of a queue request with additional metadata for ordering and storage.\"\"\"\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'tags': None,
'upload_date': '20240104'
}
}]
def _real_extract(self, url):
video_id, display_id = self._match_valid_url(url).group('id', 'display_id')
webpage = self._download_webpage(url, video_id)
post = self._search_nextjs_data(webpage, video_id)['props']['pagePr... | Review this code and list any quality issues. | [
{
"issue": "needs to be str\r\n```suggestion\r\n 'channel_id': str_or_none(post.get('user_id')),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'duration': 65,
'release_date': '20231028',
'thumbnail': 'http://img.vod.mbn.co.kr/vod2/952/2023/09/11/20230911130223_22_952_1054797_1080_7.jpg',
'series': '완벽한 결혼의 정석',
},
}]
def _real_extract(self, url):
content_id = self._match_id(url)
webpage = se... | Review this code and list any quality issues. | [
{
"issue": "since we are potentially extracting multiple m3u8s, I think this should be non-fatal\r\n```suggestion\r\n formats.extend(self._extract_m3u8_formats(m3u8_url, content_id, fatal=False))\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | #
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing ... | Review this code and list any quality issues. | [
{
"issue": "The file below seems to have a version pin for `rich`:\r\n\r\nhttps://github.com/Lightning-AI/pytorch-lightning/blob/ab619cd0e073df678ba6ba8bfbee7c3b4c67b3cb/src/lightning/pytorch/callbacks/progress/rich_progress.py#L25-L29\r\n\r\nShould we account for this as well?\r\n\r\nAlso, if possible, we coul... | 1 |
python | # Required: SPEECHMATICS_API_KEY, OPENAI_API_KEY
load_dotenv()
# This example demonstrates how to use the MultiSpeakerAdapter with STT that supports diarization.
# It works for a single audio track, and it will detect the primary speaker and suppress the background speaker.
# It can also be used to format the transcr... | Review this code and list any quality issues. | [] | 0 |
python | return ['csrc/cpu/comm/ccl.cpp', 'csrc/cpu/comm/shm.cpp']
def include_paths(self):
includes = ['csrc/cpu/includes']
return includes
def cxx_args(self):
return ['-O2', '-fopenmp']
def is_compatible(self, verbose=True):
# TODO: add soft compatibility check for private binary... | Review this code and list any quality issues. | [
{
"issue": "@delock, please feel free to disregard this optional feedback. I think it would be more readable to rename `SHM` to something like `SharedMem`. The first thing that comes to mind when reading the code is `shim` :) https://stackoverflow.com/questions/2116142/what-is-a-shim\r\n\r\nI am probably the on... | 1 |
python | 'title': 'Народная забава',
'uploader': 'Nevata',
'upload_date': '20181223',
'age_limit': 0,
'uploader_id': 'nevata.s',
'like_count': int,
'duration': 8.08,
'repost_count': int,
},
}, {
'note': 'vk.com embedded',
... | Review this code and list any quality issues. | [
{
"issue": "Do u know why all the md5s changed? If u don't, just download one of the tests manually and make sure we are fetching the correct video",
"severity": "minor",
"line": 26
}
] | 1 |
python | crops {
name
renditions {
name
width
height
url
}
}
}
}
renditions {
type
width
height
url
bitrate
}
summary
}
}
}'''
def _build_playli... | Review this code and list any quality issues. | [
{
"issue": "I'd make this a generator instead of an append loop",
"severity": "minor",
"line": 26
}
] | 1 |
python | # The remaining time in seconds before the migration is forced and the process is killed
# Optional because it's not present when the event handler is called manually
time_remaining: Annotated[timedelta_secs | None, Field(alias='timeRemainingSecs')] = None
@docs_group('Event payloads')
class EventAbortingData... | Review this code and list any quality issues. | [
{
"issue": "May I suggest adding something to distinguish crawlers for cases where there are multiple instances in a single run? If there's nothing more meaningful, `id(crawler)` should be fine.",
"severity": "minor",
"line": 26
}
] | 1 |
python | _high_priority_queue: SimpleQueue[TransactionQueueEntry]
peer_size_limit: int
log: logging.Logger
_max_tx_clvm_cost: uint64
# Each 100 pops we do a cleanup of empty peer queues
_cleanup_counter: int
def __init__(self, peer_size_limit: int, log: logging.Logger, max_tx_clvm_cost: uint64) -> None:... | Review this code and list any quality issues. | [
{
"issue": "if you invert this check and throw, the rest of the code can be de-indented",
"severity": "minor",
"line": 26
}
] | 1 |
python | comment = make_comment(line)
result.append(
ProtoComment(
type=comment_type, value=comment, newlines=nlines, consumed=consumed
)
)
nlines = 0
return result
def make_comment(content: str) -> str:
"""Return a consistently formatted comment from the... | Review this code and list any quality issues. | [
{
"issue": "FYI, you can also use Unicode name escapes, so instead of a defining an aptly named variable, you could just replace it with `\"\\N{NO-BREAK SPACE}\"`\r\n\r\nNow does it matter? Probably not since it's arguable which one is more readable, but I'd like to point it out to you as a language feature you... | 1 |
python | )
assert output.shape[0] == topk_weights.shape[0]
assert top_k_num == topk_weights.shape[1]
device = qcurr_hidden_states.device
num_slices = len(lora_a_stacked)
w1_lora_b_stacked = lora_b_stacked[0]
num_experts = lora_a_stacked[0].shape[1]
N = max_lora_rank
M = topk_weights.shape[0]
... | Review this code and list any quality issues. | [
{
"issue": "why isn't this no longer M ? I think it should still be M for the non-tma case so we don't allocate extra memory in that case.",
"severity": "major",
"line": 26
}
] | 1 |
python | 'start_time': chapter.get('time'),
'end_time': try_get(chapter, lambda x: x['time'] + x['duration']),
'title': chapter.get('text'),
} for chapter in item['cuepoints']] if item.get('cuepoints') and type_ == 'concert' else None,
}
def _real_extract(... | Review this code and list any quality issues. | [
{
"issue": "use `self._proto_relative_url`\r\n\r\n```suggestion\r\n 'image', ..., {self._proto_relative_url}, {url_or_none},\r\n {lambda x: x.replace('{width}x{height}', '0x0')}, any)) # NB: 0x0 is the original size\r\n```\r\n\r\nalso could do this, but it might not be as obvious what we'... | 1 |
python | if criterion:
y = model(data)
loss = criterion(y, label)
else:
loss = model(data, label)
loss = loss.float()
if isinstance(model, LowLevelZeroModel):
optimizer.backward(loss)
else:
loss.backward()
return y
def run_zero_test(local_rank, w... | Review this code and list any quality issues. | [] | 0 |
python | import json
import uuid
from .common import InfoExtractor
from ..utils import (
int_or_none,
mimetype2ext,
parse_iso8601,
try_call,
update_url_query,
url_or_none,
)
from ..utils.traversal import traverse_obj
SERIES_API = 'https://production-cdn.dr-massive.com/api/page?device=web_browser&item_d... | Review this code and list any quality issues. | [
{
"issue": "exclude query and fragment from the match\r\n```suggestion\r\n (?:www\\.)?dr\\.dk/tv/se(?:/ondemand)?/(?:[^/?#]+/)*|\r\n```",
"severity": "minor",
"line": 22
}
] | 1 |
python | 'login_token': login_token,
'authMode': 'cookie',
'pageURL': 'https://7plus.com.au/',
'sdkBuild': '12471',
'format': 'json',
})
if 'errorMessage' in login_resp:
raise ExtractorError(f'7plus returned an error: {login_resp["errorMessage"]}', exp... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n def _real_initialize(self):\r\n self.token = None\r\n\r\n cookies = self._get_cookies('https://7plus.com.au')\r\n api_key = next((x for x in cookies if x.startswith('glt_')), '')[4:]\r\n if not api_key: # Cookies are signed out, skip login\r\n ... | 1 |
python | resolved_init_kwargs = self._resolve_init_kwargs(func, self._init_kwargs)
obj = func(**resolved_init_kwargs)
except Exception as e:
# TODO: scrub secrets in init kwarg values
raise FlowEntryInitializationError(init_kwargs=self._init_kwargs, ex=... | Review this code and list any quality issues. | [
{
"issue": "What if the function is already wrapped by @trace?",
"severity": "minor",
"line": 26
}
] | 1 |
python | @pytest.fixture
def mock_user(self):
return MagicMock(spec=BaseUser)
@patch.object(JWTRefreshMiddleware, "_refresh_user")
@pytest.mark.asyncio
async def test_dispatch_no_token(self, mock_refresh_user, middleware, mock_request):
call_next = AsyncMock(return_value=Response())
awa... | Review this code and list any quality issues. | [
{
"issue": "do clients rely on 401/403 codes to trigger re-login logic? I suspect a 200 might cause them to try parsing the body as a success? what do you think? Could we send the Set-Cookie header with a 403 instead?",
"severity": "minor",
"line": 26
}
] | 1 |
python | if not self._match_valid_url(urlh.url):
return self.url_result(urlh.url)
headers['Referer'] = url
initial_state = self._search_json(r'window\.__INITIAL_STATE__\s*=', webpage, 'initial state', video_id)
if traverse_obj(initial_state, ('error', 'trueCode')) == -403:
self... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n raise ExtractorError(\r\n f'{join_nonempty(\"title\", \"sub_title\", from_dict=high_level, delim=\",\")}. '\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | "y, feature_names",
[
([1, 2] * 10, ["A", "B"]),
([1, 2, 3] * 6 + [1, 2], ["A_1", "A_2", "A_3", "B_1", "B_2", "B_3"]),
(
["y1", "y2", "y3"] * 6 + ["y1", "y2"],
["A_y1", "A_y2", "A_y3", "B_y1", "B_y2", "B_y3"],
),
],
)
def test_feature_names_out_set_output(... | Review this code and list any quality issues. | [] | 0 |
python | device_id = call.data[ATTR_DEVICE_ID]
if (device_entry := device_registry.async_get(device_id)) is None:
raise ServiceValidationError(
translation_domain=DOMAIN,
translation_key="invalid_device_id",
translation_placeholders={"device_id": device_id},
)
for ent... | Review this code and list any quality issues. | [] | 0 |
python | records = _convert_indicator_to_dataframe(indicator)
assert records is None or not np.isnan(records["ffr"]).any()
if generate_report:
report = _generate_report(decisions, reports)
if split == "stock":
stock_id = orders.iloc[0].instrument
report = {stock_id: report}
... | Review this code and list any quality issues. | [
{
"issue": "How does this simulator generate reports?\r\nI didn't find how the `step` is called.",
"severity": "minor",
"line": 26
}
] | 1 |
python | # 00210184 02 68 61 38 ldrb w2,[x0, x1, LSL ]
if addr == 0x210184:
assert len(ops) == 2
else:
assert len(ops) == len(de["operands"])
@pytest.mark.parametrize(
"addr,op_expressions",
[
# 00210158 20 00 80 d2 mov x0,#0x1
(0x210158, ("x... | Review this code and list any quality issues. | [
{
"issue": "this appears a little funky or is that really the expected behavior?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # GH#12754
df = (
DataFrame(
{
"A": ["one", "one", "two", "two"],
"B": [np.nan, 0.0, 1.0, 2.0],
"C": ["a", "b", "c", "c"],
"D": [1, 2, 3, 4],
}
)
.set_index(["A", "... | Review this code and list any quality issues. | [
{
"issue": "the argument checks put in place, don't actually have to do with a `MultiIndex`. Can you remove the `MultiIndex` and the use of the `level` parameter?",
"severity": "minor",
"line": 26
}
] | 1 |
python | if "redirectUris" not in onefuzz_cli_app["publicClient"]:
onefuzz_cli_app["publicClient"]["redirectUris"] = []
requiredRedirectUris = [
"http://localhost", # required for browser-based auth
f"ms-appx-web://Microsoft.AAD.BrokerPlugin/{onefuzz_cli_app['appId']... | Review this code and list any quality issues. | [
{
"issue": "the role here should be `OnefuzzAppRole.CliClient`",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Check cache if enabled - capture key BEFORE streaming to avoid mismatch
cache_key = None
if self.cache_response:
cache_key = self._get_model_cache_key(
messages, stream=True, response_format=response_format, tools=tools
)
cach... | Review this code and list any quality issues. | [] | 0 |
python | import webdriver
global ServoCommandExtensions
class ServoCommandExtensions:
def __init__(self, session):
self.session = session
def get_prefs(self, *prefs):
body = {"prefs": list(prefs)}
return self.session.send_session_command("GET", "servo/prefs/get", bo... | Review this code and list any quality issues. | [
{
"issue": "Would be nice to add a comment here the difference between existing command.",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert proxy["access"] == "token2"
assert proxy.access == "token2"
def test_tokens_proxy_empty(self):
"""Test TokensProxy with no tokens."""
proxy = TokensProxy({})
assert len(proxy) == 0
with pytest.raises(KeyError):
assert proxy["id"]
with pytest.raise... | Review this code and list any quality issues. | [
{
"issue": "The test should verify that the dictionary returned by `to_dict()` is independent of the proxy's internal state. Consider adding an assertion that modifying the returned dictionary does not affect subsequent calls to `to_dict()` or access through the proxy. This ensures the method properly maintains... | 1 |
python | tensor = ds[tensor]
# temp tensors
except TensorDoesNotExistError:
continue
if not tensor.meta.sample_compression and not tensor.meta.chunk_compression:
engine = tensor.chunk_engine
num_chunks = engine.num_chunks
if num_... | Review this code and list any quality issues. | [
{
"issue": "can we use intermediate variables to increase code readability?\r\nchunk = engine.get_chunk_from_chunk_id(chunk_id)\r\nand then check rechunk",
"severity": "minor",
"line": 26
}
] | 1 |
python | *,
axis: Axis = ...,
ascending=...,
inplace: Literal[False] = ...,
kind: SortKind = ...,
na_position: NaPosition = ...,
ignore_index: bool = ...,
key: ValueKeyFunc = ...,
) -> DataFrame: ...
@overload
def sort_values(
self,
by: IndexLa... | Review this code and list any quality issues. | [] | 0 |
python | source_name = source_file.get('public_name', 'Original')
if self._is_valid_url(download_url, video_id, '%s video' % source_name):
ext = (try_get(
source_file, lambda x: x['extension'],
compat_str) or determine_ext(
... | Review this code and list any quality issues. | [
{
"issue": "idk of any 4 letter extension for a video file.\r\nLemme know how this should be handled \r\n`determine_ext` this wasn't working",
"severity": "minor",
"line": 26
}
] | 1 |
python | from jvcprojector import JvcProjector
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN, MANUFACTURER, NAME
from .coordinator import JvcProjectorDataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
cl... | Review this code and list any quality issues. | [
{
"issue": "Bonus for the future, as we have the mac address, we can also add `connections` to the device info",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'params': {
'skip_download': 'm3u8',
},
}]
_API_PATH = 'events'
def _real_extract(self, url):
lang, video_id = self._match_valid_url(url).group('lang', 'id')
metadata = self._download_metadata(url, video_id, lang, 'eventFallbackData')
info = traverse_obj(metada... | Review this code and list any quality issues. | [
{
"issue": "Imo, it makes sense for this function to return the decrypted key instead of a function",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _check_data_uniformity(keys: list[str], result: dict) -> bool:
"""
Check data uniformity since DataAnalyzer provides no support to multi-modal images with different
affine matrices/spacings due to monai transforms.
Args:
keys: a list of string-type keys under image_stats... | Review this code and list any quality issues. | [
{
"issue": "Thank you @heyufan1995 for preparing the PR.\r\n\r\nHere we should use the logging instead of `print()`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def view_query_sample(self, query: str) -> List[Dict[str, Any]]:
"""Execute query and return sample results"""
try:
# Add LIMIT if not present
if "LIMIT" not in query.upper():
query += " LIMIT 10"
df = self.client.query(query).to_dataframe... | Review this code and list any quality issues. | [
{
"issue": "Missing SQL query validation before executing user-provided queries. All other data loaders in the codebase (MySQL, PostgreSQL, MSSQL, S3, Azure Blob) use `validate_sql_query(query)` from `data_formulator.security` before executing queries to prevent SQL injection attacks. This security validation s... | 1 |
python | path = luigi.Parameter()
accepts_messages = True
def output(self):
return luigi.LocalTarget(self.path)
def run(self):
msg = ""
time.sleep(1)
if not self.scheduler_messages.empty():
msg = self.scheduler_messages.get().content
with self.output().open("w... | Review this code and list any quality issues. | [] | 0 |
python | data = bytes_to_intlist(compat_b64decode(data))
password = bytes_to_intlist(password.encode('utf-8'))
key = password[:key_size_bytes] + [0] * (key_size_bytes - len(password))
key = aes_encrypt(key[:BLOCK_SIZE_BYTES], key_expansion(key)) * (key_size_bytes // BLOCK_SIZE_BYTES)
nonce = data[:NONCE_LENGTH... | Review this code and list any quality issues. | [] | 0 |
python | model_kwargs = self._update_model_kwargs_for_generation(
outputs,
model_kwargs,
is_encoder_decoder=self.config.is_encoder_decoder,
)
unfinished_sequences = unfinished_sequences & ~stopping_criteria(input_ids, scores)
this_peer_finished... | Review this code and list any quality issues. | [
{
"issue": "maybe we can open an issue on torch directly!",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'description': 'playlist',
'timestamp': 1611171863,
'title': 'playlist',
},
'playlist_mincount': 6,
}, {
'url': 'https://peertube.tux.ovh/w/p/wkyqcQBnsvFxtUB2pkYc1e',
'info_dict': {
'id': 'wkyqcQBnsvFxtUB2pkYc1e',
'description': 'Cette ... | Review this code and list any quality issues. | [
{
"issue": "Seems same as channelIE except type is hardcoded to `video-playlists`",
"severity": "minor",
"line": 26
}
] | 1 |
python | from fastapi import APIRouter, File, Form, UploadFile
from llama_stack_api.router_utils import standard_responses
from llama_stack_api.vector_io import VectorStoreChunkingStrategy
from llama_stack_api.version import LLAMA_STACK_API_V1ALPHA
from .api import FileProcessors
from .models import ProcessFileResponse
def ... | Review this code and list any quality issues. | [] | 0 |
python | FUTURE_DAILY_BAR_SOURCE_FROM_MINUTE : bool
If this flag is set, `make_future_daily_bar_data` will read data from
the minute bar reader defined by a `WithBcolzFutureMinuteBarReader`.
Methods
-------
make_bcolz_daily_bar_rootdir_path() -> string
A class method that returns the path fo... | Review this code and list any quality issues. | [
{
"issue": "Ah thanks for fixing, this was my fault because I was only using this fixture along with `WithBcolzEquityDailyBarReader`. Although now we won't be able to set this field separately between the two fixtures, maybe we should make this `BCOLZ_FUTURE_DAILY_BAR_WRITE_METHOD_NAME`?",
"severity": "mino... | 1 |
python | 'url': 'http://livestream.com/bsww/concacafbeachsoccercampeonato2015',
'only_matching': True,
}]
_API_URL_TEMPLATE = 'http://livestream.com/api/accounts/%s/events/%s'
def _parse_smil_formats_and_subtitles(
self, smil, smil_url, video_id, namespace=None, f4m_params=None, transform_rtmp_u... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'format_id': f'smil_{tbr:.0f}',\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'description': 'Сезон 3 Епизод 25'
},
},
{
'url': 'https://play.nova.bg/video/igri-na-volqta/season-3/igri-na-volqta-2021-09-20-1/548227',
'md5': '5fd61b8ecbe582fc021019d570965d58',
'info_dict': {
'id': '548227',
'ext': 'mp4... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n display_id = self._match_id(url)\r\n webpage = self._download_webpage(url, display_id)\r\n video_props = self._parse_json(self._search_regex(\r\n r'<script\\s?id=\\\"__NEXT_DATA__\\\"\\s?type=\\\"application/json\\\">({.+})</script>',\r\n w... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.