language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | page += 1
return entries
def _real_extract(self, url):
show_id = self._match_id(url)
qs = compat_parse_qs(compat_urllib_parse_urlparse(url).query)
if qs.get('shareHightlight') and not self._yes_playlist(show_id, qs["shareHightlight"][0]):
return self._extract_highlight(... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n return self.playlist_result(\r\n itertools.chain(self._extract_show_replays(show_id), self._extract_show_highlights(show_id)),\r\n show_id, show_info.get('title'))\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | @click.command(context_settings={"help_option_names": ["-h", "--help"]})
@click.option(
"--bind-host", type=str, help="Address to bind the server to.", default="localhost"
)
@click.option("--bind-port", type=int, help="Port to listen on", default=45484)
@click.version_option(version=black.__version__)
def main(bind... | Review this code and list any quality issues. | [
{
"issue": "We'll probably also want to expose some headers. At least `Content-Type`, but maybe just `*`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'response_type': 'code',
'scope': 'openid',
'nonce': random_uuidv4(),
'prompt': 'none'}),
'', headers=self.headers)
self.get_token(None, {
'code': compat_urlparse.parse_qs(handle.geturl()).get('code')[-1], # There can be multi... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n res = self._download_json('https://sso.tennistv.com/auth/realms/TennisTV/protocol/openid-connect/token',\r\n video_id, 'Fetching tokens', 'Unable to fetch tokens',\r\n headers=self.headers, data=urlencode_post... | 1 |
python | :param kwargs: Extra parameters to include.
:return: A HTTP redirect response.
"""
auth_context = self.create_authorization_url(redirect_uri, **kwargs)
self._save_authorize_data(redirect_uri=redirect_uri, **auth_context)
request_handler.redirect(auth_context["url"], status=302)
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n # Authlib 1.6.6+ always writes state to session even when cache is available. We also override state access to use the cache instead of session in `TornadoIntegration`.\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | series_meta = traverse_obj(meta, {
'title': 'program_name',
'channel': 'media_name',
'thumbnail': (('thumbnail_c', 'thumbnail_p'), {url_or_none}),
}, get_all=False)
if headline_id:
return self._extract_episode_info(
traverse_obj(meta, (
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n```\r\nthis should be `'params': {'skip_download': True},`, but playlists aren't downloaded anyways so it can be removed",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'md5': '71459c5375c617c265a22f083facce67',
'info_dict': {
'id': 'a00269ix3l8',
'ext': 'mp4',
'title': '鸡毛飞上天 第01集',
'description': 'md5:8cae3534327315b3872fbef5e51b5c5b',
'thumbnail': r're:^https?://[^?#]+7ce5noezvafma27',
'series': '鸡毛飞上天'... | Review this code and list any quality issues. | [
{
"issue": "Do you have a link where vqq has drm?",
"severity": "minor",
"line": 26
}
] | 1 |
python | if resultSet.get('vpn'):
evt = SpiderFootEvent("WEBSERVER_TECHNOLOGY", f"Server is VPN: {resultSet.get('vpn')}", self.__name__, event)
self.notifyListeners(evt)
if resultSet.get('web_proxy'):
evt = SpiderFootEvent("WEBSERVER_TE... | Review this code and list any quality issues. | [
{
"issue": "`RAW_RIR_DATA` should only be reported if data was found for the entity.",
"severity": "minor",
"line": 26
}
] | 1 |
python | # https://docs.python.org/3/library/asyncio-eventloop.html?highlight=get_running_loop#asyncio.get_running_loop
try:
asyncio.get_running_loop()
return True
except RuntimeError:
return False
def async_run_allowing_running_loop(async_func, *args, **kwargs):
"""Run an async function in... | Review this code and list any quality issues. | [
{
"issue": "`sync_to_async` and `async_to_sync`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | np.array([0.0, 0.0, 0.2], dtype=np.float32),
atol=0.2,
err_msg=f"Sphere center {center} moves too far from [0.0, 0.0, 0.2].",
)
link_verts = link.get_verts()
center = link_verts.mean(axis=0)
min_pos_z = link_verts[..., 2].min()
assert_allclose(
min_pos_z,
-1.0e-4,
... | Review this code and list any quality issues. | [
{
"issue": "Only break line when reaching 120 chars line width limit.",
"severity": "minor",
"line": 26
}
] | 1 |
python | from cognee.shared.logging_utils import get_logger
from cognee.modules.data.processing.document_types.Document import Document
from sqlalchemy import select
from cognee.modules.data.models import Data
from cognee.infrastructure.databases.relational import get_relational_engine
from uuid import UUID
from cognee.modules.... | Review this code and list any quality issues. | [] | 0 |
python | pass
class PipelineSpecs:
"""Namespace that defines all specifications for a pipeline's lifecycle hooks."""
@hook_spec
def before_pipeline_run(
self, run_params: dict[str, Any], pipeline: Pipeline, catalog: CatalogProtocol
) -> None:
"""Hook to be invoked before a pipeline runs.
... | Review this code and list any quality issues. | [] | 0 |
python | interactive=True,
label="Temperature",
)
top_p = gr.Slider(
minimum=0.0,
maximum=1.0,
value=1.0,
step=0.1,
interactive=True,
label="Top P",
)
max_output_tokens = gr.Slider(
minimum=16,
... | Review this code and list any quality issues. | [
{
"issue": "sorry why do we need add a gradio state for rate limit?",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'upload_date': '20171218',
'view_count': int,
},
}, {
'url': 'https://www.universal-music.de/alexander-eder/videos/der-doktor-hat-gesagt-609533',
'info_dict': {
'id': '609533',
'ext': 'mp4',
'title': 'Der Doktor hat gesagt',
'artist... | Review this code and list any quality issues. | [
{
"issue": "to guard against empty strings (as my original suggestion would've if I hadn't made that typo)\r\n```suggestion\r\n 'artists': traverse_obj(self._html_search_meta('umg-artist-screenname', webpage), (filter, all)),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | for key, val in context_response_headers.items():
response_headers[key] = val
await crawler.run([Request.from_url(str(httpbin / 'get'), headers=request_headers)])
assert response_headers.get('Power-Header') == request_headers['Power-Header']
assert response_headers.get('Library') == request_he... | Review this code and list any quality issues. | [] | 0 |
python | pass
if all(version.is_python2() for version in target_versions):
# Python 2-only code, so try Python 2 grammars.
return [
# Python 2.7 with future print_function import
pygram.python_grammar_no_print_statement,
# Python 2.7
pygram.python_grammar,
... | Review this code and list any quality issues. | [] | 0 |
python | os.path.join(cuda_path, 'version.json'),
os.path.join(cuda_path, 'version.txt'),
):
if os.path.exists(p):
with open(p, 'r', encoding='utf-8', errors='ignore') as f:
version... | Review this code and list any quality issues. | [
{
"issue": "Version range tuples displayed incorrectly in error messages. The error messages at lines 535 and 537 display version ranges as tuples like \"(11, 8)\" instead of formatted version strings like \"11.8\". This makes the error messages less user-friendly. Consider formatting these tuples as version st... | 1 |
python | d: Optional[uint8]
@streamable
@dataclass(frozen=True)
class PostInitTestClassList(Streamable):
a: list[uint8]
b: list[list[G1Element]]
@streamable
@dataclass(frozen=True)
class PostInitTestClassTuple(Streamable):
a: tuple[uint8, str]
b: tuple[tuple[uint8, str], bytes32]
@streamable
@dataclass(fro... | Review this code and list any quality issues. | [
{
"issue": "how about different names just to avoid confusion with `enum.IntEnum` and `enum.StrEnum`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'grant_type': 'device',
'device_vendor': 'unknown',
'device_model': 'unknown',
'app_id': 'dch.webapp',
'app_distributor': 'berlinphil',
'app_version': '1.0.0',
'client_secret': self._CLIENT_SECRET,
}
try:
token_response ... | Review this code and list any quality issues. | [
{
"issue": "unnecessary comment. The `note` of the download_json self-documents what is happening",
"severity": "minor",
"line": 26
}
] | 1 |
python | device: the target GPU index to convert and verify the model.
precision: the weight precision of the converted TensorRT engine-based TorchScript model.
Should be 'fp32' or 'fp16'.
input_names: optional input names of the ONNX model.
output_names: optional output names of the ONNX model.
"""
... | Review this code and list any quality issues. | [
{
"issue": "May I know why set the log level here?\r\nShould we set it back to the original level after this function?\r\n\r\nThanks.",
"severity": "minor",
"line": 26
}
] | 1 |
python | "an instruction-tuned OpenLLaMA with enhanced conversational ability by H2O.ai",
)
register_model_info(
["baize-v2-7b", "baize-v2-13b"],
"Baize v2",
"https://github.com/project-baize/baize-chatbot#v2",
"A chatbot fine-tuned from LLaMA with ChatGPT self-chat data and Self-Disillation with Feedback (SDF) ... | Review this code and list any quality issues. | [
{
"issue": "Merge them. See https://github.com/lm-sys/FastChat/blob/4dfa5e1b212ce97b3d1bfbfc361c519ad890a250/fastchat/model/model_registry.py#L52-L53",
"severity": "minor",
"line": 26
}
] | 1 |
python | import itertools
import urllib.parse
from .common import InfoExtractor
from ..utils import (
clean_html,
int_or_none,
parse_iso8601,
update_url_query,
url_or_none,
)
from ..utils.traversal import traverse_obj
class TuneInBaseIE(InfoExtractor):
def _call_api(self, item_id, endpoint=None, note=... | Review this code and list any quality issues. | [
{
"issue": "I would write it like this\r\n```py\r\n def _call_api(self, item_id, endpoint=None, note='Downloading JSON metadata', query=None):\r\n return self._download_json(\r\n join_nonempty('https://api.tunein.com/profiles', item_id, endpoint, delim='/'),\r\n item_id, note=not... | 1 |
python | "{country}_companies",
"{dataset_name}s",
"{country}_{dataset}",
],
[
"{country}_companies",
"{country}_{dataset}",
"{dataset_name}s",
"{default}",
],
... | Review this code and list any quality issues. | [
{
"issue": "This feels a bit redundant, is this testing something new?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Image
# Use an image card to display an image by specifying the URL or the data URL of the base64-encoded #image.
# ---
from h2o_wave import site, ui
import io
import base64
import numpy as np
import matplotlib.pyplot as plt
n = 25
plt.figure(figsize=(3, 3))
plt.scatter(
[0.7003673, 0.74275081, 0.70928001, 0.566... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n# Use an image card to display an image by specifying its URL or a data URL in case of the base64-encoded #image.\r\n```",
"severity": "minor",
"line": 2
}
] | 1 |
python | # The parser will emit a sentinel value if the option can be
# given as a flag without a value. This is different from None
# to distinguish from the flag not being given at all.
if value is _flag_needs_value:
if self.prompt is not None and not ctx.resilient_parsing:
... | Review this code and list any quality issues. | [
{
"issue": "Looks like this got added by mistake when rebasing. This shouldn't exist anymore.",
"severity": "minor",
"line": 26
}
] | 1 |
python | if row_filter is None:
row_filter = pyiceberg_expressions.AlwaysTrue()
if selected_fields is None:
selected_fields = ("*",)
if scan_properties is None:
scan_properties = {}
result = table.scan(
row_filter=row_filter,
selected_fields=selected_fields,
case_sensi... | Review this code and list any quality issues. | [
{
"issue": "Any thoughts on adding append to match to_parquet? Something like\r\n```py\r\nappend: bool = False\r\n```\r\nThen this could default to table.overwrite instead of append. I think it might be confusing if this doesn't match other to_* functions",
"severity": "minor",
"line": 26
}
] | 1 |
python | # ICLR: In-Context-Learning-Rate
lora_rank_decay = 64
lora_rank_iclr = 64
lora_rank_value_residual_mix = 32
lora_rank_gate = 128 if wkv_has_gate else 0
# RWKV isn't context limited
self.gguf_writer.add_context_length(1048576)
self.gguf_writer.add_embedding_length... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n\r\n@ModelBase.register(\"MaincoderForCausalLM\")\r\n```\r\nOne more. :)",
"severity": "minor",
"line": 26
}
] | 1 |
python | mock_migrate.side_effect = ClientResponseError(
request_info=MagicMock(), history=(), status=400
)
mock_entry.add_to_hass(hass)
await hass.config_entries.async_setup(mock_entry.entry_id)
await hass.async_block_till_done()
mock_migrate.assert_called_once_with(CLIENT_... | Review this code and list any quality issues. | [] | 0 |
python | worker = None
@classmethod
def setUpClass(cls):
assert cls.py_version is not None, 'Needs a python version tuple'
if not have_python_version(cls.py_version):
py_version_str = ".".join(map(str, cls.py_version))
raise unittest.SkipTest(f'Python {py_version_str} not availab... | Review this code and list any quality issues. | [
{
"issue": "You should use `text=True` to fix this code below:\n\n```py\n _, stderr = worker.communicate()\n raise RuntimeError(stderr)\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | assert issue is not None
assert issue.dismissed_version is not None
async def test_orphaned_config_entry_confirm_step(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
issue_registry: ir.IssueRegistry,
) -> None:
"""Test the orphaned_config_entry issue confirm step."""
assert await as... | Review this code and list any quality issues. | [
{
"issue": "Use `hass_storage` fixture to mock storage instead.",
"severity": "minor",
"line": 26
}
] | 1 |
python | horizontal_scale = 2.0
gs_root = os.path.dirname(os.path.abspath(gs.__file__))
path_terrain = os.path.join(gs_root, "assets", "meshes", "terrain_45.obj")
hf_terrain, xs, ys = mesh_to_heightfield(path_terrain, spacing=horizontal_scale, oversample=1)
print("hf_terrain", path_terrain, hf_terrain.shape, np.... | Review this code and list any quality issues. | [
{
"issue": "Why `convexify=False`? Since it is a plane that as no volume, it should not be convexified anyway. I think it is better to not specify arguments that are doing nothing.",
"severity": "minor",
"line": 26
}
] | 1 |
python | from pydantic import BaseModel, Field
# from metagpt.environment import Environment
from metagpt.config import CONFIG
from metagpt.actions import Action, ActionOutput
from metagpt.llm import LLM
from metagpt.logs import logger
from metagpt.memory import Memory, LongTermMemory
from metagpt.schema import Message
PREFIX... | Review this code and list any quality issues. | [
{
"issue": "If it's the first think which has 5 states, and the previous_stage is None. The llm answers 2, but here will restrict to 0 due to previous state is None. It maybe a conflict.",
"severity": "minor",
"line": 26
}
] | 1 |
python | log_interval: timedelta = timedelta(minutes=1),
statistics_log_format: Literal['table', 'inline'] = 'table',
save_error_snapshots: bool = False,
) -> Statistics[StatisticsState]:
"""Initialize a new instance with default state model `StatisticsState`."""
return Statistics[StatisticsS... | Review this code and list any quality issues. | [] | 0 |
python | 'title': title,
'description': description,
'thumbnails': thumbnails,
'age_limit': age_limit,
'is_live': is_live,
'duration': duration,
'formats': formats,
'subtitles': subtitles,
}
# vod.tvp.pl
if info.get('vor... | Review this code and list any quality issues. | [
{
"issue": "`_call_api` is conventionally used as the name. Not mandatory though",
"severity": "minor",
"line": 26
}
] | 1 |
python | (1e20, 2, -44.47448619497938, 1e-14),
(1e20, 5, -43.89811870326017, 1e-14),
(1e50, 10, -112.59320047122131, 1e-14),
]
)
def test_extreme_entropy(self, a, b, ref, tol):
# Reference values were calculated with mpmath:
# from mpmath import mp
# mp.dps = 500
... | Review this code and list any quality issues. | [
{
"issue": "I've been using camelcase distribution names as the output of `make_distribution` and capital names for the random variables once they're instantiated. Also, This is probably overkill, but I wanted to try it, so I thought I might as well include it here.\r\n```suggestion\r\n Beta = stats.make... | 1 |
python | else:
keep_running = False
break
if config["write_all"]:
keep_running = False
except Exception:
error_console.print_exception()
sys.exit(1)
else:
for SceneClass in scene_classes_from_file(fil... | Review this code and list any quality issues. | [
{
"issue": "I don't think the comment is necessary.\r\n\r\n```suggestion\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'thumbnail': url_or_none(e.get('thumbnailUrl') or e.get('thumbnailURL')),
'duration': parse_duration(e.get('duration')),
'timestamp': unified_timestamp(e.get('uploadDate')),
# author can be an instance of 'Organization' or 'Person' types.
# both types can ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n def traverse_json_ld(json_ld, at_top_level=True):\r\n for e in json_ld:\r\n if at_top_level and '@context' not in e:\r\n continue\r\n if at_top_level and set(e.keys()) == {'@context', '@graph'}:\r\n ... | 1 |
python | except (ValueError, TypeError) as e:
logger.error(f"Error projecting graph: {str(e)}")
raise e
except Exception as e:
logger.error(f"Unexpected error during graph projection: {str(e)}")
raise
async def map_vector_distances_to_graph_nodes(self, node_distances)... | Review this code and list any quality issues. | [
{
"issue": "This is not true, scored_results contains scored edge collection as well so for the edge ids we are gonna print that Node (id (id of an edge)) not found in graph for vector distances mapping.",
"severity": "minor",
"line": 26
}
] | 1 |
python | (0.5, 0, 0),
(0, 0, 0)])
def test_edge_cases(self, p, m, expected):
assert sp.pdtrik(p, m) == expected
@pytest.mark.parametrize("m", (0.1, 1, 10))
def test_p_equals_1_returns_nan(self, m):
assert np.isnan(sp.pdtrik(1, m))
def test_small_probabilities(self)... | Review this code and list any quality issues. | [
{
"issue": "Style nit: this exact formatting case is covered in PEP 8:\r\n```suggestion\r\n (2.252837804125894e-227, 100_000, 90_000)])\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | bar_execution : bool, default True
If bars should be processed by the matching engine(s) (and move the market).
bar_adaptive_high_low_ordering : bool, default False
Determines whether the processing order of bar prices is adaptive based on a heuristic.
This setting is only relevant when `bar... | Review this code and list any quality issues. | [
{
"issue": "@cjdsellers This params also can be changed?",
"severity": "minor",
"line": 26
}
] | 1 |
python | builder.set("email", user.email)
builder.set("email_domain", user.email.split("@")[-1])
except Exception as e:
logger.warning(f"Failed to fetch user context for {user_id}: {e}")
return builder.build()
async def get_feature_flag_value(
flag_key: str,
user_id: str,
default:... | Review this code and list any quality issues. | [
{
"issue": "I'd love it if we had an enum for the valid flags here so we don't miss anything when cleaning them up similar to how the front end does it:\r\n```ts\r\nimport { useFlags } from \"launchdarkly-react-client-sdk\";\r\n\r\nexport enum Flag {\r\n BETA_BLOCKS = \"beta-blocks\",\r\n AGENT_ACTIVITY = \"a... | 1 |
python | class OAuth2TokenAuthProvider(AuthProvider):
"""
JWT token authentication provider that validates a JWT token and extracts access attributes.
This should be the standard authentication provider for most use cases.
"""
def __init__(self, config: OAuth2TokenAuthConfig):
self.config = config
... | Review this code and list any quality issues. | [
{
"issue": "a trivial nit is that technically this is a bit of `validate_jwt_tokens` and a bit of init `_jwks_client`, i guess that was implicit in the `_refresh_jwks` before.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _real_extract(self, url):
mobj = self._match_valid_url(url)
display_id = mobj.group('id')
series_id = mobj.group('series_id')
program = self._download_json(
'https://www.ruv.is/gql/', display_id,
query={'query': """{
Program(id: %s){
title ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n for trk in episode.get('subtitles') or []:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | }
metadata_url = f'https://vcore-web.ivoox.com/v1/public/audios/{media_id}/download-url'
download_json = self._download_json(metadata_url, media_id, headers=headers)
download_url = download_json['data']['downloadUrl']
url = f'https://ivoox.com{download_url}'
# Formats
fo... | Review this code and list any quality issues. | [
{
"issue": "We can simplify this by making use of the nuxt data directly and using the `_search_json_ld` helper:\r\n```suggestion\r\n data = traverse_obj(self._search_nuxt_data(webpage, media_id), ('data', 'audio'))\r\n formats = []\r\n\r\n direct_download = self._download_json(\r\n ... | 1 |
python | [-0.166666666666666, -0.66666666666666, 0.0],
[-0.27777777777777, -0.77777777777777, 0.0],
[-0.38888888888888, -0.88888888888888, 0.0],
[-0.5, -1.0, 0.0],
[-0.5, -1.0, 0.0],
[-0.5, -0.333333333333, 0.0],
[-0.5, 0.33333333333... | Review this code and list any quality issues. | [] | 0 |
python | 'name': 'K8S_POD_NAME',
'valueFrom': {'fieldRef': {'fieldPath': 'metadata.name'}},
},
{
'name': 'SECRET_USERNAME',
'valueFrom': {'secretKeyRef': {'name': 'mysecret', 'key': 'username'}},
},
{
'name': 'SECRET_PASSWORD',
'valueFro... | Review this code and list any quality issues. | [] | 0 |
python | if raw_name:
info['name'] = ' '.join(re.findall('[A-Z][^A-Z]*', raw_name.replace('.com', '')))
return info
@staticmethod
def _get_formats(element) -> list:
return [NubilesPornIE._get_format(i) for i in get_elements_html_by_class('edge-download-item', element)]
@staticmethod
... | Review this code and list any quality issues. | [
{
"issue": "* Make use of traverse_obj etc to handle errors. For example, _get_tags should just be: \r\n```py\r\ntry_call(lambda: list(map(clean_html, get_elements_by_class(\r\n 'btn', get_elements_by_class('tags', element)[1])))\r\n```\r\n* Once you do this, it becomes clear that most of these should even b... | 1 |
python | ----------
name :
name
show_start :
show_start
"""
if show_start:
cls.timer_logger.info(f"{name} Begin")
cls.set_time_mark()
try:
yield None
finally:
pass
cls.log_cost_time(info=f"{name} Done")
... | Review this code and list any quality issues. | [
{
"issue": "Most of the loggers used in `Qlib` are initialized through the function `get_module_logger`. If you want to do some enhancement about setting the `logger`, you may want to make some modifications upon that function instead of creating a new one. This function seems to be a little bit redundant.",
... | 1 |
python | 'upload_date': '',
'description': 'md5:',
}
}]
def _real_extract(self, url):
display_id = self._match_id(url)
webpage = self._download_webpage(url, display_id)
rumble = RumbleEmbedIE(downloader=self._downloader)
youtube = YoutubeIE(downloader=self._downloader... | Review this code and list any quality issues. | [
{
"issue": "What should I return if no video was found? Simply doing `return` makes yt-dlp print a warning.",
"severity": "minor",
"line": 26
}
] | 1 |
python | )
from .niconico import (
NiconicoIE,
NiconicoPlaylistIE,
NiconicoUserIE,
NicovideoSearchDateIE,
NicovideoSearchIE,
NicovideoSearchURLIE,
)
from .ninecninemedia import NineCNineMediaIE
from .ninegag import NineGagIE
from .ninenow import NineNowIE
from .nintendo import NintendoIE
from .nitter im... | Review this code and list any quality issues. | [] | 0 |
python | >>> catalog = KedroDataCatalog(datasets={'cars': cars})
>>>
>>> config, credentials, load_versions, save_version = catalog.to_config()
>>>
>>> new_catalog = KedroDataCatalog.from_config(config, credentials, load_versions, save_version)
"""
catalog: dict[st... | Review this code and list any quality issues. | [
{
"issue": "I think here `_unresolve_credentials` naming make sense as we are passing resolved_config as input. My earlier [comment](https://github.com/kedro-org/kedro/pull/4717/files#r2083878857) was based on the doc string. If team feels it is clear, please ignore the comment. Thank you",
"severity": "cri... | 1 |
python | self.assertEqual(binascii.b2a_uu(b''), b' \n')
self.assertEqual(binascii.b2a_uu(b'', backtick=True), b'`\n')
self.assertEqual(binascii.a2b_uu(b' \n'), b'')
self.assertEqual(binascii.a2b_uu(b'`\n'), b'')
self.assertEqual(binascii.b2a_uu(b'\x00Cat'), b'$ $-A= \n')
self.assertEqua... | Review this code and list any quality issues. | [] | 0 |
python | 'title': "PASSE-PARTOUT - L'ete c'est fait pour jouer",
'description': 'Passe-Partout',
'uploader_id': 'mrsimpsonstef3',
'uploader': 'Phanolito',
'upload_date': '20120822',
},
}, {
'url': 'http://biqle.org/watch/-44781847_168547604',
'md5': '7f... | Review this code and list any quality issues. | [
{
"issue": "fatal=False means extraction is non-fatal, but display a warning\r\ndefault=None means don't show any warning\r\n```suggestion\r\n title = self._html_search_meta('name', webpage, 'Title', fatal=False)\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | existing_project.metadata_ = {"is_default": True}
flag_modified(existing_project, "metadata_")
db.session.commit()
elif current_default_project.name != new_default_project_name:
# If the default project exists, but the name is different, update the name.
existing_project = db.Project... | Review this code and list any quality issues. | [] | 0 |
python | token_response = self._oauth_authorize
else:
token_response = self._oauth_authorize
self._set_oauth_info(token_response, self._OAUTH_PROFILE)
self.write_debug(f'{self._OAUTH_DISPLAY_ID}: Logged in using profile "{self._OAUTH_PROFILE}"')
def _refresh_token(self, refresh_token):
... | Review this code and list any quality issues. | [
{
"issue": "passing the url might be nice for `--write-pages` purposes, and we can use traversal and `fatal=False` to make it totally non-fatal\r\n```suggestion\r\n error = traverse_obj(\r\n self._webpage_read_content(e.cause.response, self._OAUTH_TOKEN_ENDPOINT, self._OAUTH_DI... | 1 |
python | #!/usr/bin/env python3
from __future__ import annotations
import asyncio
import time
from pathlib import Path
from typing import Any, Optional
import aiofiles
import click
from chia_rs.sized_bytes import bytes32
from chia.cmds.cmds_util import get_any_service_client
from chia.full_node.full_node_rpc_client import F... | Review this code and list any quality issues. | [
{
"issue": "this should probably not be called \"batch\". This technique is typically called \"pipelining\", so this could be either \"concurrent requests\", \"requests in flight\" or \"pipeline depth\" or something like that.\r\n\r\nAlso, this should be 5, or something in that vicinity. 25000 is too many and i... | 1 |
python | "os",
"arch",
"format",
"match",
"characteristic",
"export",
"import",
"section",
"function name",
"substring",
"regex",
"string",
... | Review this code and list any quality issues. | [
{
"issue": "use a string here (just for rendering)? (and same in vverbose?)",
"severity": "minor",
"line": 26
}
] | 1 |
python | overwrite_db_session_state: bool = False
# If True, cache the current Agent session in memory for faster access
cache_session: bool = False
search_session_history: Optional[bool] = False
num_history_sessions: Optional[int] = None
# If True, the agent creates/updates session summaries at the end of ... | Review this code and list any quality issues. | [
{
"issue": "still need the `enable_user_memories` flag here right?",
"severity": "minor",
"line": 26
}
] | 1 |
python | phi += PI
# Undo old rotation (in reverse order)
self.rotate(-self._current_phi, Z_AXIS, about_point=ORIGIN)
self.rotate(-self._current_theta, Y_AXIS, about_point=ORIGIN)
# Do new rotation
self.rotate(theta, Y_AXIS, about_point=ORIGIN)
self.rotate(phi, Z_AXIS, about_poi... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n def get_direction(self) -> Vector3D:\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | label_fill_opacity: Optional[float] = __d_label_fill_opacity
label_stroke_color: Optional[str] = __d_label_stroke_color
label_stroke_opacity: Optional[float] = __d_label_stroke_opacity
label_stroke_size: Optional[float] = __d_label_stroke_size
label_font_size: Optional[float] = __d_label... | Review this code and list any quality issues. | [] | 0 |
python | """If True, the crawler will set up logging infrastructure automatically."""
statistics_log_format: NotRequired[Literal['table', 'inline']]
"""If 'table', displays crawler statistics as formatted tables in logs. If 'inline', outputs statistics as plain
text log messages.
"""
keep_alive: NotRequire... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n \"\"\"If set to `True`, the crawler will automatically try to fetch the robots.txt file for each domain,\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | _empty_cuda_cache(self.save_mem)
if self.in_channels != self.out_channels:
x = self.nin_shortcut(x)
_empty_cuda_cache(self.save_mem)
out = x + h
out_tensor: torch.Tensor = convert_to_tensor(out)
return out_tensor
class MaisiEncoder(nn.Module):
"""
Conv... | Review this code and list any quality issues. | [
{
"issue": "Please also update the docstring for num_res_blocks.\r\n`num_res_blocks: Number of residual blocks (see ResBlock) per level.`\r\nto\r\n`num_res_blocks: Number of residual blocks (see AEKLResBlock) per level.`",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _extract_stream(self, video_id, stream, base_info):
formats = []
subtitles = {}
http_stream_url = stream.get('StreamHttpUrl') # TODO: find test
stream_url = stream.get('StreamUrl')
if http_stream_url:
formats.append({'url': http_stream_url})
if not strea... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'title': join_nonempty(title, tag, delim=' - '),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | calibration_path : str
(optional) path to save quantize parameters after calibration
onnx_path : str
(optional) path to save onnx model
input_shape : list or tuple
input shape to onnx model
device : torch.device
device of the model, used to place t... | Review this code and list any quality issues. | [
{
"issue": "is `calibration_config[name]['tracked_min_weight'] = -val` and `calibration_config[name]['tracked_max_weight'] = val`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | TEST_CASE_SABLOCK = []
for dropout_rate in np.linspace(0, 1, 4):
for hidden_size in [360, 480, 600, 768]:
for num_heads in [4, 6, 8, 12]:
for rel_pos_embedding in [None, RelPosEmbedding.DECOMPOSED]:
for input_size in [(16, 32), (8, 8, 8)]:
test_case = [
... | Review this code and list any quality issues. | [
{
"issue": "This is going to skip if before 0.2.0 not 2.0.0",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'url': 'https://lr1.lsm.lv/lv/pleijeris/?embed=0&id=48205&time=00%3A00&idx=0',
'only_matching': True,
}]
def _real_extract(self, url):
query = parse_qs(url)
video_id = traverse_obj(query, ('show', 0, {int_or_none}))
if not video_id:
video_id = traverse_obj(query, ('... | Review this code and list any quality issues. | [
{
"issue": "if multiple formats are available, m3u8 extraction should be false\r\n```suggestion\r\n formats.extend(self._extract_m3u8_formats(source_url, video_id, fatal=False))\r\n```",
"severity": "major",
"line": 26
}
] | 1 |
python | )
if tz1 != tz2:
expected = expected.astype(object)
result = concat([first, second])
tm.assert_frame_equal(result, expected)
def test_concat_compat_on_non_ns_datetime_EA(self):
# GH#33331
first = Series(np.array([datetime(2010, 1, 1)], dtype="datetime64[D]"))
... | Review this code and list any quality issues. | [] | 0 |
python | return ret
def _extract_n_function_name(self, jscode):
# Examples (with placeholders nfunc, narray, idx):
# * .get("n"))&&(b=nfunc(b)
# * .get("n"))&&(b=narray[idx](b)
# * b=String.fromCharCode(110),c=a.get(b))&&c=narray[idx](c)
# * a.D&&(b="nn"[+a.D],c=a.get(b))&&(c=nar... | Review this code and list any quality issues. | [
{
"issue": "`[\\w$]` would be more compact even if it might potentially match weird Unicode characters too (without `(?a)`).",
"severity": "minor",
"line": 26
}
] | 1 |
python | keys = []
for chunk_info in chunk_info_iterator:
assert isinstance(chunk_info[2], CacheEngineKey)
start, end, _ = chunk_info
if end <= aligned_computed_tokens:
continue
chunk_info_list.append(chunk_in... | Review this code and list any quality issues. | [
{
"issue": "nit:\r\nI know this is not from your PR but could we add a comment on what `chunk_info[2]` is?",
"severity": "minor",
"line": 26
}
] | 1 |
python | import re
import sys
from typing import Any
from unittest.mock import patch
import pytest
from click.testing import CliRunner
from tests.util import DETERMINISTIC_HEADER, read_data
if sys.version_info < (3, 11): # noqa: C901
try:
from aiohttp import web
from aiohttp.test_utils import AioHTTPTest... | Review this code and list any quality issues. | [
{
"issue": "I think you can use https://docs.pytest.org/en/7.1.x/how-to/skipping.html#skip-all-test-functions-of-a-class-or-module so you don't have to indent the whole thing",
"severity": "minor",
"line": 10
}
] | 1 |
python | """The number of objects returned on this page."""
offset: Annotated[int, Field(default=0)]
"""The starting position of the first object returned, as specified in the API call."""
limit: Annotated[int, Field(default=0)]
"""The maximum number of objects to return, as specified in the API call."""
... | Review this code and list any quality issues. | [
{
"issue": "It represents a representation? You probably want to reword this 🙂",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'https://api.bilibili.com/x/player/playurl', video_id,
query={'bvid': video_id, 'cid': cid, 'fnval': 4048},
note='Extracting festival video formats')['data']
thumbnail = traverse_obj(
initial_state, ('sectionEpisodes', lambda _, v: v['bvid'] == video_id, 'cov... | Review this code and list any quality issues. | [
{
"issue": "this shares a lot of common code with the non-festival return dict\r\n\r\nyou could do something like this instead\r\n```diff\r\ndiff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py\r\nindex 50013c4fe..78f39b098 100644\r\n--- a/yt_dlp/extractor/bilibili.py\r\n+++ b/yt_dlp/extract... | 1 |
python | }, {
'url': 'https://www.figureitoutbaseball.com/en/c/fiob-podcast-14-dan-bertolini-ncaa-d1-head-coach-recorded-11-29-2018.1367',
'only_matching': True,
}, {
'url': 'https://videos.telusworldofscienceedmonton.ca/en/c/the-aurora-project-timelapse-4.577',
'only_matching': True,
}, ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n r'content_api:\\s*([\"\\'])(?P<url>https?://(?:(?!\\1).)+)\\1', webpage, 'content api url', group='url')\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def test_calling_from_subclass_returns_correct_instance(self):
pool = redis.BlockingConnectionPool.from_url("redis://localhost")
assert isinstance(pool, redis.BlockingConnectionPool)
def test_client_creates_connection_pool(self):
r = redis.Redis.from_url("redis://myhost")
assert r.c... | Review this code and list any quality issues. | [] | 0 |
python | continuation_list[0] = value
return
continuation_list[0] = None
def _extract_notification(self, notification):
# notificationRenderer
video_id = traverse_obj(
notification, ('navigationEndpoint', 'watchEndpoint', 'videoId'), expected_type=str)
if ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n return self.url_result(\r\n f'https://www.youtube.com/watch?v={video_id}', YoutubeIE,\r\n video_id, title, thumbnails=thumbnails, uploader=uploader)\r\n```\r\nor, if we end up extracting more fields, it's better to do:\r\n```py\r\n return {\r\n ... | 1 |
python | del bid # unused
# lm_head is not used in llama.cpp, while autoawq will include this tensor in model
# To prevent errors, skip loading lm_head.weight.
if name == "lm_head.weight":
logger.debug(f"Skipping get tensor {name!r} in safetensors so that convert can end normally.")
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if (self.dir_model / \"tokenizer.model\").is_file():\r\n self._set_vocab_sentencepiece()\r\n self.gguf_writer.add_add_space_prefix(False)\r\n else:\r\n self._set_vocab_gpt2()\r\n```\r\nI see that Gemma3 repo has both, while it might wo... | 1 |
python | # add an image if one is present in the wikipedia returned json
def add_image_to_message(state: State, idx: int, text: str, image_url: str):
msg_content: str = state.messages[idx][1]
pos = msg_content.find(text)
if pos > -1:
msg_content = msg_content[: pos + len(text)] + f"\n\n... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n set_message(state, f\"{event_type} for {for_date}:\\n\", idx)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'redirect_uri': 'https://tennistv.com',
'response_mode': 'fragment',
'response_type': 'code',
'scope': 'openid'
})
post_url = self._html_search_regex(r'action=["\'](.+?)["\']\s+?method=["\']post["\']', login_page, None)
temp_page = sel... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'code': compat_urlparse.parse_qs(handle.geturl()).get('code')[-1],\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | @pytest.mark.parametrize("n_cubes", [5])
@pytest.mark.parametrize("enable_island", [False])
@pytest.mark.parametrize("n_envs", [2048])
@pytest.mark.parametrize(
"gjk, enable_mujoco_compatibility",
[
(False, True), # MPR
(False, False), # MPR+SDF
(True, False), # GJK
],
)
def test_... | Review this code and list any quality issues. | [
{
"issue": "* Why are you adding this in benchmarks?\r\n* You should mark this test as required\r\n* You should explicitly check for something, or document why it is not necessary\r\n* Are you sure doing one step is necessary? Build is not enough?",
"severity": "minor",
"line": 26
}
] | 1 |
python | actual_shape = str(getattr(xyxy, "shape", None))
is_valid = isinstance(xyxy, np.ndarray) and xyxy.ndim == 2 and xyxy.shape[1] == 4
if not is_valid:
raise ValueError(
f"xyxy must be a 2D np.ndarray with shape {expected_shape}, but got shape "
f"{actual_shape}"
)
def vali... | Review this code and list any quality issues. | [
{
"issue": "The check `np.issubdtype(actual_dtype, bool)` will correctly identify bool dtypes, but note that numpy bool arrays can have dtype np.bool_ (which is the numpy boolean type). This check should work correctly for both np.bool_ and Python's built-in bool type used in dtype specification. Consider addin... | 1 |
python | stop_after: Optional[int] = None
"""
Stop after a specific number of steps.
"""
activation_checkpointing: Optional[ActivationCheckpointingStrategy] = None
"""
The activation checkpointing strategy to use.
"""
fused_loss: Optional[bool] = None
"""
Whether to use the fused CE los... | Review this code and list any quality issues. | [
{
"issue": "Can you add a note here about how to use the script to view the results?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Check if media is hosted on reddit:
reddit_video = try_get(data, lambda x: x['media']['reddit_video'])
if reddit_video:
playlist_urls = [
try_get(reddit_video, lambda x: unescapeHTML(x[y])) for y in ('dash_url', 'hls_url')
]
dash_playlist_url = play... | Review this code and list any quality issues. | [
{
"issue": "something like this is more readable imo\r\n\r\n```suggestion\r\n return {\r\n **info,\r\n 'formats': formats,\r\n 'duration': int_or_none(reddit_video.get('duration')),\r\n })\r\n\r\n return {\r\n **info,\r\n ... | 1 |
python | NickNightIE,
NickRuIE,
)
from .niconico import (
NiconicoIE,
NiconicoPlaylistIE,
NiconicoUserIE,
NicovideoSearchDateIE,
NicovideoSearchIE,
NicovideoSearchURLIE,
)
from .ninecninemedia import NineCNineMediaIE
from .ninegag import NineGagIE
from .ninenow import NineNowIE
from .nintendo import... | Review this code and list any quality issues. | [] | 0 |
python | expected = pl.DataFrame(
[
pl.Series("int_var", [2.5], dtype=pl.Float64),
pl.Series("float_var", [2.5], dtype=pl.Float64),
]
)
assert_frame_equal(result, expected)
def test_arr_std(data_dispersion: pl.DataFrame) -> None:
df = data_dispersion
result = df.select... | Review this code and list any quality issues. | [] | 0 |
python | 'ext': 'mp4',
'title': 'Australia to help staff Ebola treatment centre in Sierra Leone',
'description': 'md5:809ad29c67a05f54eb41f2a105693a67',
},
'skip': 'this video has expired',
}, {
'url': 'http://www.abc.net.au/news/2015-08-17/warren-entsch-introduces-same-sex-ma... | Review this code and list any quality issues. | [
{
"issue": "Should be processing the title with `lambda title: re.sub(r'\\s+-\\s+ABC \\w+$', '', title)`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | [
{"col1": 1, "col2": 2},
{"col1": 3, "col2": 4},
{"col1": 5, "col2": 6},
{"col1": 7, "col2": 8},
]
)
ds_sorted_col1 = ds_named.sort("col1", descending=True)
r1 = ds_sorted_col1.select_columns(["col1"]).take_all()
r2 = ds_sorted_col1.select_column... | Review this code and list any quality issues. | [] | 0 |
python | ('%j', '2/03', '%j/%y', d2),
('%w', '6/04/03', '%w/%U/%y', d1),
# %u requires a single digit.
('%W', '6/4/2003', '%u/%W/%Y', d1),
('%V', '6/4/2003', '%u/%V/%G', d3),
]
for reason, string, format, target in inputs:
reason = 'test single ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\n def test_strptime_F_format(self):\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'params': {'skip_download': True}
},
# Podcast feed with no description
{
'url': 'https://www.deutschlandfunk.de/podcast-tolle-idee-100.html',
'info_dict': {
'id': False,
'title': 'Wissenschaftspodcast - Tolle Idee! - Was wurde daraus?',
... | Review this code and list any quality issues. | [
{
"issue": "playlist title should be non-fatal\r\n```suggestion\r\n ['og:title', 'twitter:title'], webpage, default=None),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | support : dict or tuple
A dictionary describing the support of the distribution or a tuple
describing the endpoints of the support. This behaves identically to
the values of the parameters dict described above, except that the key
``typical`` is ignored.
The clas... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n parameterizations, then the class must also define a ``_process_parameters``\r\n```\r\nWe *could* allow the users to make this a public function (`process_parameters`), instead.",
"severity": "minor",
"line": 26
}
] | 1 |
python | from capa.features.common import OS, FORMAT_PE, FORMAT_ELF, OS_ANY, OS_WINDOWS, FORMAT_FREEZE, FORMAT_RESULT, ARCH_ANY, Arch, Format, String, Feature
from capa.features.freeze import is_freeze
from capa.features.address import NO_ADDRESS, Address, FileOffsetAddress
logger = logging.getLogger(__name__)
def extract_fi... | Review this code and list any quality issues. | [
{
"issue": "should we add a constant for the beginning bytes?",
"severity": "minor",
"line": 26
}
] | 1 |
python | @pytest.mark.skipif(
not TRITON_CUDA_SUPPORT or not HAS_TRITON, reason="triton requires cuda version to be higher than 11.4"
)
def test_rotary_emb():
SEQ_LEN = 1
HEAD_NUM = 32
HEAD_DIM = 128
dtype = torch.float
# create data
x_shape = (SEQ_LEN, HEAD_NUM, HEAD_DIM)
x = -2.3 + 0.5 * torch.... | Review this code and list any quality issues. | [
{
"issue": "Is this `atol=2e-1` too large?",
"severity": "minor",
"line": 26
}
] | 1 |
python | "jsx": template_str,
"style": (style + os.linesep) if style else "",
"head": head or [],
"context": context or self._gui._get_default_module_name(),
}
)
def _direct_render_json(self, data):
return jsonify(data)
def get_flask(self):
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n from gevent import get_hub, monkey\r\n\r\n```\r\nfor the linter (including the empty line)",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _is_same(f1: str, f2: str) -> bool:
return Path(f1) == Path(f2) or os.path.samefile(f1, f2)
else:
def _is_same(f1: str, f2: str) -> bool:
return os.path.samefile(f1, f2)
def module_name_from_path(path: Path, root: Path) -> str:
"""
Return a dotted module name based on the given path,... | Review this code and list any quality issues. | [
{
"issue": "Thanks @dongfangtianyu for the PR.\r\n\r\n> Based on this, I attempted to modify the execution process in _import_module_using_spec, moving the import of the parent module to after insert_missing_modules() to avoid a KeyError due to sys.modules not being ready.\r\n\r\nBut this change seems to be doi... | 1 |
python | 'note': 'This extractor is used by AcademyMel extractor, which has a login feature'
}]
def _real_extract(self, url):
valid_url = self._match_valid_url(url)
if not valid_url:
raise ExtractorError('Invalid URL found', expected=True)
webpage = self._download_webpage(url,
... | Review this code and list any quality issues. | [
{
"issue": "`video_id` and the m3u8 URL can (and should be) fatal\r\n```suggestion\r\n window_configs = self._search_json(\r\n r'window\\.configs\\s*=', webpage, 'config', None)\r\n video_id = str(window_configs['videoId'])\r\n formats, subtitles = self._extract_m3u8_formats_and_... | 1 |
python | Send a `DELETE` request.
**Parameters**: See `httpx.request`.
"""
return await self.request(
"DELETE",
url,
params=params,
headers=headers,
cookies=cookies,
auth=auth,
allow_redirects=allow_redirects,
... | Review this code and list any quality issues. | [
{
"issue": "We should put `self._is_closed = True` as the very first line, rather than the very last line, since that'd handle potential race conditions more cleanly.",
"severity": "critical",
"line": 26
}
] | 1 |
python | # When concatenating image and video datasets, pop will return None for image or video sample
images = example.pop(self.image_key, None) or []
videos = example.pop(self.video_key, None) or []
image_offset, video_offset = 0, 0
for message in messages:
if not images and not vi... | Review this code and list any quality issues. | [
{
"issue": "It's not right here, image may be a PIL.Image or dict. For example, https://huggingface.co/datasets/hiyouga/geometry3k, the image is a PIL.Image.",
"severity": "minor",
"line": 26
}
] | 1 |
python | Args:
loss_dict (Dict): losses.
Returns:
Dict: losses detached from autograph.
"""
loss_dict_detached = {}
for key, value in loss_dict.items():
if isinstance(value, (int, float)):
loss_dict_detached[key] = value
else:
... | Review this code and list any quality issues. | [] | 0 |
python | # because if we stop Firecracker first, the backend will want
# to exit as well and this will cause a race condition.
for backend in self.disks_vhost_user.values():
backend.kill()
self.disks_vhost_user.clear()
if (
self.expect_kill_by_signal is False
... | Review this code and list any quality issues. | [
{
"issue": "Shouldn't we use `LOG.exception` for a traceback?",
"severity": "minor",
"line": 26
}
] | 1 |
python | LOG.error(self.log_data)
raise
if self.screen_pid:
# Killing screen will send SIGHUP to underlying Firecracker.
# Needed to avoid false positives in case kill() is called again.
self.expect_kill_by_signal = True
utils.run_cmd(f"kill -9 {self.screen_pi... | Review this code and list any quality issues. | [
{
"issue": "Also could be replaced by `psutil.Process()`",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'url': 'https://nebula.app/lindsayellis',
'info_dict': {
'id': 'lindsayellis',
'title': 'Lindsay Ellis',
'description': 'Enjoy these hottest of takes on Disney, Transformers, and Musicals.',
},
'playlist_mincount': 100,
'par... | Review this code and list any quality issues. | [
{
"issue": "Oh, this actually turned out much simpler than I initially thought. I didn't think to extract one page in `_real_extract` and then pass that data inside 👍 \r\n\r\nI would write this function like this, but your implementation is fine as well. So I won't insist\r\n\r\n```py\r\n episodes = cha... | 1 |
python | #
# However, when git executes pre_commit_hook.py from its symlink in
# /.git/hooks, the shebang #!/usr/bin/env python at the top of this file
# causes the python interpreter to execute this hook directly rather than
# as a discovered module. So, Python instead adds /.git/hooks to sys.path,
# rather than the opipa/oppi... | Review this code and list any quality issues. | [
{
"issue": "I don't think this should be committed.",
"severity": "minor",
"line": 26
}
] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.