language string | code-snippit string | instruction string | flaws list | flaw_count int64 |
|---|---|---|---|---|
python | else:
# Overflow infusion, so get the second to last challenge. skip_overflow_last_ss_validation is False,
# Which means no sub slots are omitted
challenges_to_look_for = 2
else:
challenges_to_look_for = 1
reversed_challenge_hashes: list[bytes3... | Review this code and list any quality issues. | [
{
"issue": "this comment should probably move to the new function below now",
"severity": "minor",
"line": 26
}
] | 1 |
python | except ImportError:
warnings.warn(FixupWarning(ERR_NOT_INSTALLED))
else:
_verify_django_version(django)
return DjangoFixup(app).install()
return None
class DjangoFixup:
"""Fixup installed when using Django."""
def __init__(self, app: "Celery"):
self.app... | Review this code and list any quality issues. | [
{
"issue": "One problem at the moment (I think) is that it would override a custom class set by the user.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def week_start(days_offset=0):
return NthTradingDayOfWeek(n=days_offset)
@staticmethod
def week_end(days_offset=0):
return NDaysBeforeLastTradingDayOfWeek(n=days_offset)
class time_rules(object):
market_open = AfterOpen
market_close = BeforeClose
every_minute = Always
class Cale... | Review this code and list any quality issues. | [
{
"issue": "FYI, we also have `zipline.utils.classproperty`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | and (
(v == "import" and p and p.type == syms.import_name)
or (v == "from" and p and p.type == syms.import_from)
)
)
def is_with_or_async_with_stmt(leaf: Leaf) -> bool:
"""Return True if the given leaf starts a with or async with statement."""
return bool(
leaf.type... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n the latter is used when it has decorators.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | Used by CustomFactor, CustomFilter, CustomClassifier, etc.
"""
ctx = nullctx()
def __new__(cls,
inputs=NotSpecified,
outputs=NotSpecified,
window_length=NotSpecified,
mask=NotSpecified,
dtype=NotSpecified,
missi... | Review this code and list any quality issues. | [] | 0 |
python | from exo.shared.types.common import Host
from exo.shared.types.memory import Memory
from exo.shared.types.text_generation import TextGenerationTaskParams
from exo.shared.types.worker.instances import (
BoundInstance,
MlxJacclInstance,
MlxRingInstance,
)
from exo.shared.types.worker.shards import (
CfgSh... | Review this code and list any quality issues. | [
{
"issue": "Instead of extending this code in the globals, could you move this into `main` in `runner.py`? Thanks!",
"severity": "major",
"line": 26
}
] | 1 |
python | 'openai:gpt-4o',
output_type=NativeOutput(
[Fruit, Vehicle],
name='Fruit or vehicle',
description='Return a fruit or vehicle.'
),
)
result = agent.run_sync('What is a Ford Explorer?')
print(repr(result.output))
#> Vehicle(name='Ford Explorer', wheels=4... | Review this code and list any quality issues. | [
{
"issue": "Users mostly don't deal with profile fields directly, and should be able to assume that we've done our best to make them correct out of the box so that they don't have to worry about them, so I'd rather say:\r\n\r\n```suggestion\r\n If no template is specified but the model's profile indicates th... | 1 |
python | 'title': 'Total War: Warhammer - Greenskins',
},
'playlist_mincount': 33,
},
]
def _real_extract(self, url):
playlist_id = self._match_id(url)
if playlist_id.endswith('/'):
playlist_id = playlist_id[:-1]
webpage = self._download_webpage(url, ... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n category = next((cat for cat in game['subcategories'] if cat.get('slug', '').lower() == category_slug),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | data = self._download_json(
f'https://arhiiv.err.ee/api/v1/content/video/{video_id}', video_id)
formats, subtitles = [], {}
media_data = traverse_obj(data, ('media', 'src'), {url_or_none})
if 'hls' in media_data:
fmts, subs = self._extract_m3u8_formats_and_subtitles(
... | Review this code and list any quality issues. | [
{
"issue": "The `release_year` value is the same as the year provided in `uploadDate`? or in `date`?",
"severity": "minor",
"line": 26
}
] | 1 |
python | self._set_cookie('steampowered.com', 'birthtime', '944006401')
self._set_cookie('steampowered.com', 'lastagecheckage', '1-0-2000')
webpage = self._download_webpage(video_url, playlist_id)
if re.search('<div[^>]+>Please enter your birth date to continue:</div>', webpage) is not None:
... | Review this code and list any quality issues. | [
{
"issue": "can be simplified as below\r\n```diff\r\n@@ -1,11 +1,19 @@\r\n+import json\r\n import re\r\n\r\n from .common import InfoExtractor\r\n from ..utils import (\r\n ExtractorError,\r\n+ clean_html,\r\n extract_attributes,\r\n- get_element_by_class,\r\n str_or_none,\r\n+ url_or_none,... | 1 |
python | _VALID_URL = r'https?://(?:t\.bilibili\.com|(?:www\.)?bilibili\.com/opus)/(?P<id>\d+)'
_TESTS = [{
'url': 'https://t.bilibili.com/998134289197432852',
'info_dict': {
'id': 'BV1TAmBYVEJr',
'ext': 'mp4',
'uploader_id': '1192648858',
'comment_count': int,... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n # Without the newer chrome UA, the API will return an error (-352)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'age_limit': 18,
'availability': 'premium_only',
'duration': 2710,
'cast': ['Bella Grey', 'Oliver Trunk'],
'tags': 'count:29',
'thumbnail': r're:^https?://cdn-image\.gtflixtv\.com.*\.jpg.*$',
'subtitles': 'count:6'
},
'params': {
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n cast = traverse_obj(public_data, (('models', 'male_models'), ..., 'model_name'))\r\n```\r\n\r\nInline in `metadata = `too",
"severity": "minor",
"line": 26
}
] | 1 |
python | @staticmethod
def _is_pattern(pattern: str):
"""Check if a given string is a pattern. Assume that any name with '{' is a pattern."""
if "{" in pattern:
return True
return False
@classmethod
def _match_pattern(
cls, data_set_patterns: dict[str, dict[str, Any]], da... | Review this code and list any quality issues. | [
{
"issue": "Nit\r\n```suggestion\r\n 2. Decreasing number of placeholders (number of curly bracket pairs)\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'language': 'hin',
'categories': ['Drama'],
'asset_type': 'ORIGINAL',
'age_limit': 13,
'content_discriptor': 'Frightening Scenes',
},
}, {
# Streams/Clips
'url': 'https://www.mzaalo.com/play/clip/83cdbcb5-400a-42f1-a1d2-459053cfbda5/Manto-Ki-Ka... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n path = (f'partner/streamurl?&assetId={video_id}&getClipDetails=YES' if type_ == 'clip'\r\n else f'api/v2/player/details?assetType={type_.upper()}&assetId={video_id}')\r\n```\r\nline too long",
"severity": "major",
"line": 26
}
] | 1 |
python | """Initialise the weather platform."""
super().__init__(coordinator)
self._attr_unique_id = self.coordinator.data["station"].code
self._attr_name = self.coordinator.data["station"].name
@property
def device_info(self) -> DeviceInfo:
"""Return the device info."""
unique_i... | Review this code and list any quality issues. | [
{
"issue": "The return type hint should be `float | None` to match the base class `WeatherEntity.native_temperature` property signature. The base class defines this as a `@cached_property` that returns `float | None`.\n```suggestion\n def native_temperature(self) -> float | None:\n```",
"severity": "majo... | 1 |
python | def before_trading_start(context, data):
context.results = pipeline_output('test')
self.assertTrue(context.results.empty)
count[0] += 1
self.run_algorithm(
initialize=initialize,
handle_data=handle_data,
before_trading_start=before_trading... | Review this code and list any quality issues. | [
{
"issue": "style-wise, I usually write multi-line inheritance declarations as:\r\n\r\n```python\r\nclass MyClass(Parent1,\r\n Parent2,\r\n Parent3,\r\n ...):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | frozen = True
allow_population_by_field_name = True
class RuleMatches(BaseModel):
"""
args:
meta: the metadata from the rule
source: the raw rule text
"""
meta: RuleMetadata
source: str
matches: Tuple[Tuple[frz.Address, Match], ...]
class ResultDocument(BaseModel):
... | Review this code and list any quality issues. | [
{
"issue": "can you explain this check? how could there be a rule match that isn't in the rules?",
"severity": "minor",
"line": 26
}
] | 1 |
python | finish_reason=finish_reason,
provider_details=provider_details,
)
@overload
async def _messages_create(
self,
messages: list[ModelMessage],
stream: Literal[True],
model_settings: BedrockModelSettings | None,
model_request_parameters: ModelRequestParam... | Review this code and list any quality issues. | [] | 0 |
python | retry=RETRY,
timeout=TIMEOUT,
metadata=METADATA,
impersonation_chain=IMPERSONATION_CHAIN,
deferrable=True,
)
operator.execute(mock.MagicMock())
mock_hook.assert_called_once_with(
gcp_conn_id=GCP_CONN_ID,
impersonation_chai... | Review this code and list any quality issues. | [
{
"issue": "Is this related to this change? Not sure why this change is required?",
"severity": "minor",
"line": 26
}
] | 1 |
python | EmailStr = Annotated[str, AfterValidator(email)]
def uuid_value(value: Any) -> str:
if value == "":
return str(value)
try:
uuid_obj = uuid.UUID(value)
return str(uuid_obj)
except ValueError:
error = f"{value} is not a valid uuid."
raise ValueError(error)
def norm... | Review this code and list any quality issues. | [
{
"issue": "The type annotation declares `UUIDStrOrEmpty` as `Annotated[str, ...]`, but the `normalize_uuid` validator function returns `str | None`. This creates a type mismatch because the annotation promises a `str` type, but `None` can be returned. \n\nConsider either:\n1. Changing the annotation to `Annota... | 1 |
python | fig = go.Figure()
fig.add_trace(
{
"type": "scatter",
"x": qqplot_data[0].get_xdata(),
"y": qqplot_data[0].get_ydata(),
"mode": "markers",
"marker": {"color": "#19d3f3"},
}
)
fig.add_trace(
{
"type": "scatter",... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\ndef _pred_ic(pred_label: pd.DataFrame = None, methods: Sequence[Literal[\"IC\", \"Rank IC\"]] = (\"IC\", \"Rank IC\"), **kwargs) -> tuple:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | parse_resolution,
urlencode_postdata,
unescapeHTML,
js_to_json,
urljoin,
)
class DouyuBaseIE(InfoExtractor):
def _download_cryptojs_md5(self, video_id):
for url in [
'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js',
'https://cdn.bootcdn.net/aj... | Review this code and list any quality issues. | [
{
"issue": "`b` and `c` are never passed as anything else, so we can simplify the signature\r\n```suggestion\r\n def _calc_sign(self, sign_func, video_id, a):\r\n b = uuid.uuid4().hex\r\n c = round(time.time())\r\n js_script = f'{self._get_cryptojs_md5(video_id)};{sign_func};console.log(... | 1 |
python | f"Node returned unexpected exit code ({return_code}) vs ({expected_ret_code}) when stopping")
# Check that stderr is as expected
self.stderr.seek(0)
stderr = self.stderr.read().decode('utf-8').strip()
if stderr != expected_stderr:
raise AssertionError("Unexpected stderr {} !=... | Review this code and list any quality issues. | [] | 0 |
python | 'only_matching': True,
}, {
'url': 'https://klasika.lsm.lv/lv/embed/?id=110806&show=0&theme=white&size=16x9',
'only_matching': True,
}, {
'url': 'https://lr4.lsm.lv/lv/embed/?id=184282&show=0&theme=white&size=16x9',
'only_matching': True,
}, {
'url': 'https://pieci.lv... | Review this code and list any quality issues. | [
{
"issue": "It will either be an `int` or `None`, so we can use `not` instead:\r\n```suggestion\r\n if not video_id:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | ),
InstallationCandidate(
"simple",
"1.0",
Link("simple-1.0-pyT-none-any.whl"),
),
InstallationCandidate(
"simple",
"1.0",
Link("simple-1.0.tar.gz"),
),
]
valid... | Review this code and list any quality issues. | [
{
"issue": "I _think_ `reversed` here is intended, otherwise this line is just identical to the previous one. It’s likely for testing sort stability. Same for other changes in this file.",
"severity": "minor",
"line": 26
}
] | 1 |
python | entry=entry,
target=ErrorTarget.EXECUTOR,
) from e
return module_name, func_name
def _init_input_sign(self):
if not self.is_function_entry and self._flow is not None:
# In the yaml file, user can define the inputs and init signature for the flow, also SDK may... | Review this code and list any quality issues. | [
{
"issue": "why is this a warning? I think this should be debug?",
"severity": "critical",
"line": 26
}
] | 1 |
python | from wagtail.admin.ui.tables import Column, TitleColumn
from wagtail.admin.views import generic
from wagtail.admin.viewsets.model import ModelViewSet
from wagtail.models import Locale
from wagtail.permissions import locale_permission_policy
from .forms import LocaleForm
from .utils import get_locale_usage
if TYPE_CHE... | Review this code and list any quality issues. | [
{
"issue": "I think we can use `get_content_languages().keys()` no?",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
from ..utils import (
get_element_by_id,
int_or_none,
js_to_json,
traverse_obj,
ExtractorError,
)
import base64
from urllib.parse import parse_qs
class IxiguaIE(InfoExtractor):
_VALID_URL = r'https?://(?:\w+\.)?ixigua\.com/(?:video/)?(?P<id>[0-9]+).+'
_TES... | Review this code and list any quality issues. | [
{
"issue": "`25:15: E203 whitespace before ':'`",
"severity": "minor",
"line": 25
}
] | 1 |
python | from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
NextMediaActionNewsIE,
NextMediaIE,
NextTVIE,
)
from .nexx import (
Nexx... | Review this code and list any quality issues. | [] | 0 |
python | ) -> str:
"""
Start a Cloud Data Fusion pipeline. Works for both batch and stream pipelines.
:param pipeline_name: Your pipeline name.
:param pipeline_type: Optional pipeline type (BATCH by default).
:param instance_url: Endpoint on which the REST APIs is accessible for the inst... | Review this code and list any quality issues. | [
{
"issue": "Small suggestion - maybe encapsulate the programType in an enum?",
"severity": "minor",
"line": 26
}
] | 1 |
python | logit_bias=model_settings.get('logit_bias', OMIT),
logprobs=model_settings.get('openai_logprobs', OMIT),
top_logprobs=model_settings.get('openai_top_logprobs', OMIT),
prompt_cache_key=model_settings.get('openai_prompt_cache_key', OMIT),
prompt_cache_retent... | Review this code and list any quality issues. | [
{
"issue": "Hmm, now that we're having to resort to this, I do think it'd be easier to have `_check_azure_content_filter` return a `ModelResponse` directly, and then change the signature (and call sites) of this method to allow that as an alternative to `chat.ChatCompletion`.\r\n\r\nThat'd be similar to what we... | 1 |
python | When ``point`` and the control points have different shapes.
"""
if not all(np.shape(point) == np.shape(c_p) for c_p in control_points):
raise ValueError(
f"Point {point} and Control Points {control_points} have different shapes."
)
control_points = np.array(control_points)
n... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n negative *= -1\r\n```\r\n(or `sign *= -1` if it's renamed to that)",
"severity": "minor",
"line": 26
}
] | 1 |
python | mode: Literal["validation", "serialization"] = "validation"
@property
def alias(self) -> str:
a = self.field_info.alias
return a if a is not None else self.name
@property
def required(self) -> bool:
return self.field_info.is_required()
@prop... | Review this code and list any quality issues. | [
{
"issue": "Once Pydantic 2.12 is released, we'll be able to remove the `no cover` statement here.",
"severity": "minor",
"line": 26
}
] | 1 |
python | if success:
yield f
else:
self.to_screen('[info] Unable to download format %s. Skipping...' % f['format_id'])
def _default_format_spec(self, info_dict, download=True):
def can_merge():
merger = FFmpegMergerPP(self)
return merger.available... | Review this code and list any quality issues. | [] | 0 |
python | finally:
if os.path.exists(temp_file.name):
try:
os.remove(temp_file.name)
except OSError:
self.report_warning(f'Unable to delete temporary file "{temp_file.name}"')
f['__working'] = success
i... | Review this code and list any quality issues. | [] | 0 |
python | class BSBLanData:
"""BSBLan data stored in the Home Assistant data object."""
fast_coordinator: BSBLanFastCoordinator
slow_coordinator: BSBLanSlowCoordinator
client: BSBLAN
device: Device
info: Info
static: StaticState
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool... | Review this code and list any quality issues. | [] | 0 |
python | # Copied from diffusers.loaders.lora_pipeline.SanaLoraLoaderMixin.unfuse_lora
def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
r"""
Reverses the effect of
[`pipe.fuse_lora()`](https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraBaseMixin.f... | Review this code and list any quality issues. | [
{
"issue": "Just to note that this loader is shared amongst Wan 2.1 and 2.2 as the pipelines are also one and the same. For Wan 2.1, we won't have any `transformer_2`.",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
video_attrs = extract_attributes(self._search_regex(r'(<video[^>]+>)', webpage, 'video'))
sources = self._parse_json(video_attrs['data-sources'], video_id)
formats = [{
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n (lambda _, v: v['@type'] == 'SocialMediaPosting', 'author', 'name', {str}), get_all=False),\r\n```",
"severity": "critical",
"line": 26
}
] | 1 |
python | """
self.initialize_suite()
counter = multiprocessing.Value(ctypes.c_int, 0)
pool = multiprocessing.Pool(
processes=self.processes,
initializer=self.init_worker.__func__,
initargs=[
counter,
self.initial_settings,
... | Review this code and list any quality issues. | [
{
"issue": "I experiemented with another approach where I wrapped the body of `_init_worker` in a `try/except`, and set a flag (`init_failed`) in the except, and accessed it in the workers via a lock (shared state), but the bloating of the diff told me I was going in the wrong direction (?)",
"severity": "c... | 1 |
python | "licenseConcluded",
"externalRefs",
"primaryPackagePurpose",
])
class PackageFiles(typing.NamedTuple):
"""Structure for describing the files of a package"""
include: list[str] | None
exclude: list[str] | None = None
# SBOMS don't have a method to specify the sources of files
# so we need to do t... | Review this code and list any quality issues. | [
{
"issue": "@SethMichaelLarson If I understand correctly, this was a typo.\r\nCould you confirm?\r\nCan we simply exclude the file now, like this?",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'The flag enables the voiceover tab for non-curated explorations.',
feature_flag_domain.ServerMode.TEST
)
),
FeatureNames.SHOW_RESTRUCTURED_STUDY_GUIDES.value: (
(
'Allows the creators to access the updated study guide editor page '
'and learners to access the... | Review this code and list any quality issues. | [
{
"issue": "Remove these lines (refer to my comment [here](https://github.com/oppia/oppia/pull/22891/files#r2183327277))",
"severity": "minor",
"line": 26
}
] | 1 |
python | key,
ENCODED_SEQUENCE_NAMES_FOLDER,
UNSHARDED_ENCODER_FILENAME,
)
)
return "/".join(
(
"versions",
commit_id,
key,
ENCODED_SEQUENCE_NAMES_FOLDER,
UNSHARDED_ENCODER_FILENAME,
)
)
def ... | Review this code and list any quality issues. | [
{
"issue": "Just curious is it enough to check only these things? Shouldn't we also check whether chunks exists?",
"severity": "minor",
"line": 26
}
] | 1 |
python | # aweme/detail endpoint subs
captions_info = traverse_obj(
aweme_detail, ('interaction_stickers', ..., 'auto_video_caption_info', 'auto_captions', ...), expected_type=dict)
for caption in captions_info:
caption_url = traverse_obj(caption, ('url', 'url_list', ...), expected_type=u... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if not caption.get('url'):\r\n continue\r\n subtitles.setdefault(caption.get('lang') or 'en', []).append({\r\n 'ext': remove_start(caption.get('caption_format'), 'web'),\r\n 'url': caption['url']... | 1 |
python | Load of this non-dag flow is provided, but direct call of it will cause exceptions.
"""
def __init__(
self,
path: Union[str, PathLike],
code: Union[str, PathLike],
entry: str,
data: dict,
**kwargs,
):
# flow.dag.yaml file path or entry.py file path
... | Review this code and list any quality issues. | [
{
"issue": "FlexFlow can have name in yaml? return just the flow_dir name might not have bug",
"severity": "critical",
"line": 26
}
] | 1 |
python | 'protocol': 'm3u8_native',
}],
'ja': [{
'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/jpn/prog_index.m3u8',
'ext': 'vtt',
'protocol': 'm3u8_native',
... | Review this code and list any quality issues. | [] | 0 |
python | from ..utils import (
OnDemandPagedList,
extract_attributes,
get_element_by_class,
get_element_html_by_class,
get_element_text_and_html_by_tag,
get_elements_html_by_class,
int_or_none,
join_nonempty,
try_call,
unified_strdate,
urljoin
)
from ..utils.traversal import traverse_... | Review this code and list any quality issues. | [
{
"issue": "don't need to add fields with a value of `None`",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _download_access_token(self, video_id, token_kind, param_name):
method = '%sPlaybackAccessToken' % token_kind
ops = {
'query': '''{
%s(
%s: "%s",
params: {
platform: "web",
playerBackend: "mediaplayer",
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'url': re.sub(r'\\d+x\\d+(\\.\\w+)($|(?=[?#]))', r'0x0\\g<1>', thumbnail),\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from .rumble import RumbleEmbedIE
from .youtube import YoutubeIE
from ..utils import clean_html
class Funker530IE(InfoExtractor):
_VALID_URL = r'https?:\/\/(?:www\.)?funker530\.com\/video\/(?P<id>[^\/]+)\/?'
... | Review this code and list any quality issues. | [
{
"issue": "`unicode_literals` isn't necessary\r\n\r\nand IMO we should use the (non-fatal) `_search_regex` method instead of importing `re`",
"severity": "minor",
"line": 5
}
] | 1 |
python | value = DecimalNumber(angle.get_value(degrees=True), unit="^{\\circ}")
value.next_to(angle, UR)
self.add(line1, line2, angle, value)
"""
if degrees:
return self.angle_value / DEGREES
return self.angle_value
@staticmethod
def from_thr... | Review this code and list any quality issues. | [
{
"issue": "Return type is superfluous if it is given in the method header",
"severity": "minor",
"line": 26
}
] | 1 |
python | lambda tn: np.maximum(0., 1. - _cdf_cvm_inf(tn)),
fill_value = 1.)
return p
@xp_capabilities(np_only=True)
@_axis_nan_policy_factory(CramerVonMisesResult, n_samples=2, too_small=1,
result_to_tuple=_cvm_result_to_tuple)
def cramervonmises_2samp(x, y, method='auto',... | Review this code and list any quality issues. | [
{
"issue": "Was:\r\n```python3\r\n if tn < 0.003:\r\n p = 1.0\r\n else:\r\n p = max(0, 1. - _cdf_cvm_inf(tn))\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def deriv(x):
return self.slope_of_tangent(x, graph)
return self.plot(deriv, color=color, **kwargs)
def get_derivative_graph(
self, graph: "ParametricFunction", color: Color = GREEN, **kwargs
) -> ParametricFunction:
return self.plot_derivative_graph(graph, color, **kwargs)... | Review this code and list any quality issues. | [
{
"issue": "Seems like you forgot to deprecate this one",
"severity": "minor",
"line": 26
}
] | 1 |
python | if app_name in config.get("groups.can_delete_roles_apps", []):
return True
return False
async def can_clone_roles(groups, username):
approval_groups = config.get("groups.can_clone_roles", [])
if username in approval_groups:
return True
for g in approval_groups:
if g in groups:
... | Review this code and list any quality issues. | [
{
"issue": "In what context would we be creating an IAM role in the same or in a different account? Should we simplify the description to just specify creating an IAM role?",
"severity": "major",
"line": 26
}
] | 1 |
python | Overview:
This is a utility method for running evaluations iteratively over a series
of checkpoints. This method can be run in parallel with a training job to
compute metrics per checkpoint without wasting valuable time in the main
training loop.
Args:
config: The desired co... | Review this code and list any quality issues. | [
{
"issue": "Can you give a bit more information about the return type since it contains \"Any\"?\r\n\r\nPerhaps something like: \"Returns a list of dictionaries, where each dictionary contains a mapping from an evaluation metric name to its computed value\"",
"severity": "minor",
"line": 26
}
] | 1 |
python | # Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
from sklearn.utils._array_api import (
_find_matching_floating_dtype,
get_namespace_and_device,
)
def _weighted_percentile(
array, sample_weight, percentile_rank=50, average=False, xp=None
):
"""Compute the weighted percen... | Review this code and list any quality issues. | [
{
"issue": "I thought about replacing this sentence with a description of how `inverted_cdf` and `averaged_inverted_cdf` behaves but I sort of think the descriptions in the paper with the equations are clearer.\r\n\r\nI also think it's initially 'confusing' when I describe that when a percentile falls exactly o... | 1 |
python | self.dot_distance = dot_distance
self.elbow = elbow
inter = line_intersection(
[line1.get_start(), line1.get_end()], [line2.get_start(), line2.get_end()]
)
if radius == None:
if quadrant[0] == 1:
dist_1 = np.linalg.norm(line1.get_end() - inter)
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n if elbow:\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | async_add_entities(entities)
class SmartTubPump(SmartTubEntity, SwitchEntity):
"""A pump on a spa."""
def __init__(
self, coordinator: DataUpdateCoordinator[dict[str, Any]], pump: SpaPump
) -> None:
"""Initialize the entity."""
super().__init__(coordinator, pump.spa, "pump")
... | Review this code and list any quality issues. | [
{
"issue": "Could we make this translatable?",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .common import InfoExtractor
from ..utils import int_or_none, mimetype2ext, parse_iso8601, traverse_obj, url_or_none
class BlueskyIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?(?:bsky\.app|main\.bsky\.dev)/profile/(?P<handle>[^/]+)/post/(?P<id>[0-9a-zA-Z]+)'
_TESTS = [{
'url': 'https://bsk... | Review this code and list any quality issues. | [
{
"issue": "For my suggestions to work:\r\n```suggestion\r\nfrom ..utils import (\r\n format_field,\r\n int_or_none,\r\n mimetype2ext,\r\n parse_iso8601,\r\n truncate_string,\r\n update_url_query,\r\n url_or_none,\r\n variadic,\r\n)\r\nfrom ..utils.traversal import traverse_obj\r\n```",
... | 1 |
python | import importlib.metadata
import sys
def test_schema_entrypoint() -> None:
if sys.version_info < (3, 10):
eps = importlib.metadata.entry_points()["validate_pyproject.tool_schema"]
(black_ep,) = [ep for ep in eps if ep.name == "black"]
else:
(black_ep,) = importlib.metadata.entry_points... | Review this code and list any quality issues. | [] | 0 |
python | 'series': 'Mighty Ships',
'season_number': 7,
'episode_number': 3,
'episode': 'Wind Surf',
},
'params': {
'format': 'bestvideo',
'skip_download': True,
}
}, {
'url': 'https://7plus.com.au/UUUU?episode-id=AUMS43-001',
... | Review this code and list any quality issues. | [
{
"issue": "cookie based login must never throw error since the cookies may not have been intended to log in to this site",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'url': 'http://player.bilibili.com/player.html?aid=92494333&cid=157926707&page=1',
'only_matching': True,
}
def _real_extract(self, url):
video_id = self._match_id(url)
return self.url_result(
'http://www.bilibili.tv/video/av%s/' % video_id,
ie=BiliBiliIE.ie_key(... | Review this code and list any quality issues. | [
{
"issue": "why?\r\n\r\nPS: `json is str` is wrong syntax anyway",
"severity": "critical",
"line": 26
}
] | 1 |
python | 'new_outputs_ex_coinbase': Decimal('49.99968800'),
'coinbase': Decimal('50.00031200'),
'unspendables': {
'genesis_block': 0,
'bip30': 0,
'scripts': 0,
'unclaimed_rewards': 0,
}
})
... | Review this code and list any quality issues. | [] | 0 |
python | "agentGraphExecutionId": graph_exec_id,
"executionStatus": ExecutionStatus.INCOMPLETE,
"Input": {"every": {"name": {"not": input_name}}},
},
order={"addedTime": "asc"},
include={"Input": True},
)
json_input_data = json.dumps(input_data)
if existing_execution:... | Review this code and list any quality issues. | [] | 0 |
python | BLUE_E,
DARK_GREY,
GREEN_E,
LIGHT_GREY,
MAROON_B,
YELLOW,
color_gradient,
)
from ..utils.iterables import tuplify
EPSILON = 0.0001
class SampleSpace(Rectangle):
"""A sample space.
Examples
--------
.. manim:: ExampleSampleSpace
:save_last_frame:
class Example... | Review this code and list any quality issues. | [
{
"issue": "Can you follow the instructions in [#hackthon-guidelines](https://discord.com/channels/581738731934056449/846805485529464832/849962667568529428)? ie, use the manimator bot(`!mdocstring` command) to create doc strings. I am asking that because it runs through an automatic formatted as explained in th... | 1 |
python | from oumi.core.datasets import VisionLanguageSftDataset
from oumi.core.registry import register_dataset
from oumi.core.types.conversation import (
ContentItem,
Conversation,
Message,
Role,
Type,
)
@register_dataset("allenai/pixmo-cap-qa")
class PixmoCapQADataset(VisionLanguageSftDataset):
"""D... | Review this code and list any quality issues. | [
{
"issue": "move 404 warning to class docstring",
"severity": "minor",
"line": 26
}
] | 1 |
python | from .._entity._reload import _Reloader
from .._version._version_manager_factory import _VersionManagerFactory
from ..common.scope import Scope
from ._file_datanode_mixin import _FileDataNodeMixin
from ._tabular_datanode_mixin import _TabularDataNodeMixin
from .data_node import DataNode
from .data_node_id import DataNo... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n _ENCODING_KEY = \"encoding\"\r\n _DEFAULT_ENCODING_VALUE = \"utf-8\"\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | break
exclusive_start_key = list_keys.next_exclusive_start_key
async def set_value(
self,
key: str,
value: Any,
content_type: str | None = None,
) -> None:
"""Set a value in the KVS.
Args:
key: Key of the record to set.
value:... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n key: Key of the record for which URL is required.\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | video_id = self._match_id(next_page)
return self._download_webpage(next_page, video_id, headers={'X-Requested-With': 'XMLHttpRequest'})
def _collect_hrefs(self, webpage):
regex = re.compile(r'rounded-site-bottom"><a class="tm-ouvir-podcast" href="([^"]+)"')
matches = regex.finditer(webpage)... | Review this code and list any quality issues. | [
{
"issue": "I think `get_elements_html_by_class('tm-ouvir-podcast', webpage)` could be used here",
"severity": "minor",
"line": 26
}
] | 1 |
python | return self.set_coord(
mobject.get_coord(dim, direction),
dim=dim,
direction=direction,
)
def match_x(self, mobject: "Mobject", direction=ORIGIN):
"""Match x coord. to the x coord. of another :class:`~.Mobject`."""
return self.match_coord(mobject, 0, dire... | Review this code and list any quality issues. | [
{
"issue": "There needs to be a new line between these two lines",
"severity": "minor",
"line": 26
}
] | 1 |
python | }
)
del sd
ip_state_dict = {}
ip_state_dict.update({"image_proj": ip_image_projection_state_dict, "ip_adapter": ip_cross_attn_state_dict})
return ip_state_dict
class FluxTransformerTests(ModelTesterMixin, unittest.TestCase):
model_class = FluxTransformer2DModel
main_input_name = "hidden_s... | Review this code and list any quality issues. | [] | 0 |
python | class XAttrMetadataPP(PostProcessor):
"""Set extended attributes on downloaded file (if xattr support is found)
More info about extended attributes for media:
http://freedesktop.org/wiki/CommonExtendedAttributes/
http://www.freedesktop.org/wiki/PhreedomDraft/
http://dublincore.org/docum... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n 'user.dublincore.description': 'description',\r\n # 'user.xdg.comment': 'description',\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | ]
from typing import *
import numpy as np
from colour import Color
from manim.mobject.opengl_compatibility import ConvertToOpenGL
from ..constants import *
from ..mobject.geometry import Circle, Square
from ..mobject.mobject import *
from ..mobject.opengl_mobject import OpenGLMobject
from ..mobject.types.vectorized... | Review this code and list any quality issues. | [
{
"issue": "This shouldn't be necessary since `VGroup`, which this class inherits from, already has `metaclass=ConvertToOpenGL` \r\n```suggestion\r\nclass ParametricSurface(VGroup):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | ) -> Self | None:
"""Find type information for a matching DP code available for this device."""
if dpcodes is None:
return None
if not isinstance(dpcodes, tuple):
dpcodes = (dpcodes,)
lookup_tuple = (
(device.function, device.status_range)
... | Review this code and list any quality issues. | [
{
"issue": "According to the SDK, `report_type` should always be defined.\r\nIf it causes an issue during testing, then the tests need to be adjusted accordingly.\r\n\r\n```suggestion\r\n report_type=current_definition.report_type,\r\n```",
"severity": "minor",
"line": 26
}
... | 1 |
python | entries = hass.config_entries.async_entries(DOMAIN)
assert len(entries) == 1
assert entries[0].state is ConfigEntryState.SETUP_ERROR
async def test_setup_unexpected_error(
hass: HomeAssistant,
setup_integration: ComponentSetup,
caplog: pytest.LogCaptureFixture,
) -> None:
"""Test setup error."... | Review this code and list any quality issues. | [] | 0 |
python | @agent.tool_plain(metadata={'type': 'plain'})
def plain_tool(z: int) -> int:
return z * 3
plain_tool_def = agent._function_toolset.tools['plain_tool']
assert plain_tool_def.metadata == {'type': 'plain'}
# Test with FunctionToolset.tool decorator
from pydantic_ai.toolsets.function import Fu... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\ndef test_tool_metadata():\r\n \"\"\"Test that metadata is properly set on tools.\"\"\"\r\n metadata = {'category': 'test', 'version': '1.0'}\r\n\r\n def simple_tool(ctx: RunContext[None], x: int) -> int:\r\n return x * 2 # pragma: no cover\r\n\r\n tool = Tool(sim... | 1 |
python | def get_selected_tools_from_request(
self, request: Request | None
) -> set[str] | None:
"""
Extract the selected tools from the request query parameters.
Returns None if no tools parameter is specified (meaning all tools are available).
Adds the tool prefix if needed.
... | Review this code and list any quality issues. | [
{
"issue": "Given we always add the tool to the set, I think this could be simplified:\r\n\r\n```python\r\nif self.tool_prefix and (self.tool_prefix + tool) in self.tool_to_endpoint:\r\n full_tool_names.add(self.tool_prefix + tool)\r\nelse:\r\n full_tool_names.add(tool)\r\n ```",
"severity": "minor"... | 1 |
python | gs_glb_material.roughness_texture, gs_usd_material.roughness_texture, 1.0, material_name, "roughness"
)
check_gs_textures(
gs_glb_material.metallic_texture, gs_usd_material.metallic_texture, 0.0, material_name, "metallic"
)
check_gs_textures(gs_glb_material.normal_texture, gs... | Review this code and list any quality issues. | [
{
"issue": "Skip line:\r\n```python\r\n </robot>\r\n\"\"\"\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | and returns the time taken to load that url in seconds.
Args:
url (string): The user defined url.
Returns:
time_to_load (float): The time taken to load the website in seconds.
"""
if ("https" or "http") in url: # Checking for presence of protocols
open_this_url = urlopen(url)... | Review this code and list any quality issues. | [
{
"issue": "- looks great!\r\n- can avoid extra variable ` time_to_load`\r\n```python\r\nreturn end_time - start_time\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | def _get_checkok_params():
return {'contentCheckOk': True, 'racyCheckOk': True}
@classmethod
def _generate_player_context(cls, sts=None):
context = {
'html5Preference': 'HTML5_PREF_WANTS',
}
if sts is not None:
context['signatureTimestamp'] = sts
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n po_token_client, sep, po_token = token_str.partition('+')\r\n if not sep:\r\n self.report_warning('Invalid po_token configuration format. Expected \"client+po_token\"')\r\n continue\r\n if not client or po_token_client ... | 1 |
python | 'md5': '43649f002d85e1c2f319bb478d479c40',
'info_dict': {
'id': '2972047',
'ext': 'mp3',
'display_id': '1-avis-akvasas-ka',
'title': '1. Avis akvasas ka',
'url': 'https://www.ilpost.it/wp-content/uploads/2023/12/28/1703781217-l-invasione-pt1-v6.mp3',
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n endpoint_metadata['ajax_url'], display_id, data=urlencode_postdata({\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | if usd_mass <= 0:
return None
# Check for invalid values (inf or nan)
if np.isinf(usd_mass) or np.isnan(usd_mass):
return None
return float(usd_mass)
def usd_attr_array_to_numpy(attr: Usd.Attribute, dtype: np.dtype, return_none: bool = False) -> np.ndarray | None:
if attr.HasValue():
... | Review this code and list any quality issues. | [
{
"issue": "Do not do this. It hides user-specified invalid values.",
"severity": "minor",
"line": 26
}
] | 1 |
python | pipeline = AutoPipelineForText2Image.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
).to("cuda")
pipeline.load_lora_weights(
"jbilcke-hf/sdxl-cinematic-1", weight_name="pytorch_lora_weights.safetensors", adapter_name="cinematic"
)
... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n adapter_names (`List[str]` or `str`):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | from Cython.Compiler.Version import version as cython_version
except ImportError:
cython = None
else:
from numpy._utils import _pep440
# Note: keep in sync with the one in pyproject.toml
required_version = '3.0.6'
if _pep440.parse(cython_version) < _pep440.Version(required_version):
# too ol... | Review this code and list any quality issues. | [
{
"issue": "This is a little too vague for my taste. I'd say that \"building cython code in a subprocess doesn't make sense to do in many threads and sometimes crashes\"",
"severity": "critical",
"line": 26
}
] | 1 |
python | from ..utils import (
clean_html,
determine_ext,
extract_attributes,
get_elements_html_by_class,
int_or_none,
merge_dicts,
mimetype2ext,
parse_iso8601,
remove_end,
remove_start,
str_or_none,
traverse_obj,
unified_strdate,
url_or_none,
)
class NYTimesBaseIE(InfoE... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n for video in traverse_obj(content_media_json, ('renditions', ..., {dict})):\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | *all reals* between `a` and `b`.
a, b : float array_like
Real lower and upper limits of summed terms. Must be broadcastable.
Each element of `a` must be less than the corresponding element in `b`.
step : float array_like
Finite, positive, real step between summed terms. Must be broadcast... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n tolerances : dict, optional\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | "input_tokens": usage.get("input_tokens"),
"output_tokens": usage.get("output_tokens"),
}
}
)
elif isinstance(event, LLMResponseIncompleteEvent):
response = event.response
if response and "usage" in ... | Review this code and list any quality issues. | [
{
"issue": "It's faster to check `is not None` than to use `isinstance`. If it's only a dict or None, check for None instead.",
"severity": "minor",
"line": 26
}
] | 1 |
python | 'thumbnail': thumbnail,
'duration': int_or_none(get_text_attr(f, 'length')),
'subtitles': {
'en': [{
'url': capfile,
'ext': determine_ext(capfile, 'dfxp')
}],
} if capfile else None,
... | Review this code and list any quality issues. | [
{
"issue": "imo this isn't descriptive, especially since it's copied from CSpanIE\r\n```suggestion\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 | show_viewer=show_viewer,
show_FPS=False,
)
asset_path = get_hf_dataset(pattern="fridge/*")
fridge = scene.add_entity(
gs.morphs.URDF(
file=f"{asset_path}/fridge/fridge.urdf",
fixed=True,
)
)
@pytest.mark.required
def test_plane_texture_path_preservation(s... | Review this code and list any quality issues. | [
{
"issue": "* No need to build the scene\n * You can remove Scene options if you don't build, they won't be used anyway\n* assert \"texture_path\" in vgeom.vmesh.metadata is still not necessary. pytest will throw a clear exception anyway (plain asserts are being post-processed to ease debugging).\n\n```python\... | 1 |
python | COMPILE_CASES = [
(
"flash_hub",
torch.tensor([0.0410, 0.0410, 0.0449, 0.0508, 0.0488, 0.0586, 0.0605, 0.0586, 0.2324, 0.2422, 0.2539, 0.2734, 0.2832, 0.2812, 0.2773, 0.3047], dtype=torch.bfloat16),
True
),
(
"_flash_3_hub",
torch.tensor([0.0410, 0.0410, 0.0449, 0.050... | Review this code and list any quality issues. | [] | 0 |
python | ("id",),
("columns[mobile]",),
("gap",),
]
),
"login": lambda gui, control_type, attrs: _Builder(
gui=gui, control_type=control_type, element_name="Login", attributes=attrs, default_value=None
)
.set_value_and_default(default_val="L... | Review this code and list any quality issues. | [] | 0 |
python | api = self.get_api_with_signature(name_api=self._SLUG_API[type_url], param={
'ctime': self._TIMESTAMP,
'id': song_id})
info = self.download_json(api, song_id)
return self._process_data(info.get('data'), song_id, type_url)
def download_json(self, api, video_id):
# For... | Review this code and list any quality issues. | [
{
"issue": "```suggestion\r\n sha256 = self.get_hash256(''.join(f'{k}={v}' for k, v in param.items()))\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | for port, protocol in zip(ports, protocols):
client = Client(port=port, protocol=protocol)
docs = client.post('/', inputs=[Document()])
for doc in docs:
assert doc.text == 'processed'
@pytest.mark.parametrize(
'protocols',
[
list(protocols)
f... | Review this code and list any quality issues. | [] | 0 |
python | response: list[Issue] = await client.try_get_issues(
project=project,
status=status,
is_assigned=is_assigned,
include_comments=include_comments,
)
return response
async def run(
self,
input_data: Input,
*,
credentials: ... | Review this code and list any quality issues. | [
{
"issue": "Maybe we don't need this? we already have iterate block now that if we need singluar output we can just connect to it",
"severity": "minor",
"line": 26
}
] | 1 |
python | if model_request_parameters.output_mode == 'native':
output_object = model_request_parameters.output_object
assert output_object is not None
text = {'format': self._map_json_schema(output_object)}
elif (
model_request_parameters.output_mode == 'prompted' and self.... | Review this code and list any quality issues. | [
{
"issue": "I'd prefer to move this into the method, call it `drop_sampling_params`, and then both do the work + the warning in there",
"severity": "major",
"line": 26
}
] | 1 |
python | Traces with AgentOS
Requirements:
pip install agno opentelemetry-api opentelemetry-sdk openinference-instrumentation-agno
"""
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIChat
from agno.os import AgentOS
from agno.tools.hackernews import HackerNewsTools
from... | Review this code and list any quality issues. | [] | 0 |
python | continue
raise
break
yield from post_list.get('aweme_list', [])
if not post_list.get('has_more'):
break
query['max_cursor'] = post_list['max_cursor']
def _entries_api(self, user_id, videos):
for video in videos:
... | Review this code and list any quality issues. | [
{
"issue": "Don't unnecessarily escape chars in regex",
"severity": "critical",
"line": 26
}
] | 1 |
python | ViewSourceIE,
)
from .condenast import CondeNastIE
from .contv import CONtvIE
from .corus import CorusIE
from .cpac import (
CPACIE,
CPACPlaylistIE,
)
from .cozytv import CozyTVIE
from .cracked import CrackedIE
from .crackle import CrackleIE
from .craftsy import CraftsyIE
from .crooksandliars import CrooksAndLi... | Review this code and list any quality issues. | [
{
"issue": "you should look into why this sort of thing keeps happening with your PRs\r\n```suggestion\r\n```",
"severity": "minor",
"line": 26
}
] | 1 |
python | p = re.compile("^[a-zA-Z0-9+=,.@\\-_]+$")
match = p.match(policy_name)
if not match:
raise InvalidRequestParameter(
"The specified value for policyName is invalid. "
"It must contain only alphanumeric characters and/or the following: +=,.@_-"
)
async def get_resources_f... | Review this code and list any quality issues. | [
{
"issue": "Still need to test this, but it should give us the info we need to build/update a resource policy.",
"severity": "minor",
"line": 26
}
] | 1 |
python | cls.create_expected_df_for_factor_compute(
[(0, 200, pd.Timestamp('2015-01-12')),
(0, 201, pd.Timestamp('2015-02-10')),
(10, np.NaN, cls.window_test_start_date),
(20, 220, cls.window_test_start_date),
(20, 221, pd.Timestamp('2015-01-17'... | Review this code and list any quality issues. | [] | 0 |
python | result = df.mean(numeric_only=True)
expected = DataFrame(arr).mean().astype("Float64")
tm.assert_series_equal(result, expected)
def test_stats_mixed_type(self, float_string_frame):
with pytest.raises(TypeError, match="could not convert"):
float_string_frame.std(axis=1)
w... | Review this code and list any quality issues. | [
{
"issue": "Could you use `pytest.mark.parametrize` like \n\n```python\n@pytest.mark.parametrize(\"input_data,expected_data\", [[{\"a\": ...}, [\"48394\" ...]] ,...])\n```\n\nso we don't have to repeat 3 separate setups?",
"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.