mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Fix verify-docstrings.py
This commit is contained in:
@@ -151,7 +151,7 @@ jobs:
|
||||
run: |
|
||||
cd docs
|
||||
make html SPHINXOPTS=-W
|
||||
python3 ./docs/verify-docstrings.py
|
||||
python3 verify-docstrings.py
|
||||
linux:
|
||||
name: Linux
|
||||
needs: [commit-msg, clang-format]
|
||||
|
||||
@@ -356,7 +356,7 @@ DECLARE_REFLECTION_STRUCT(BugReport);
|
||||
"A :class:`ReplayOptions` containing the configured default replay options to use in most " \
|
||||
"scenarios when no specific options are given.\n" \
|
||||
"\n:" \
|
||||
"type: List[str]"); \
|
||||
"type: renderdoc.ReplayOptions"); \
|
||||
CONFIG_SETTING(public, QVariant, ReplayOptions, DefaultReplayOptions) \
|
||||
\
|
||||
DOCUMENT( \
|
||||
|
||||
@@ -409,8 +409,25 @@ struct TypeConversion<rdcdatetime, false>
|
||||
|
||||
static PyObject *ConvertToPy(const rdcdatetime &in)
|
||||
{
|
||||
return PyDateTime_FromDateAndTime(in.year, in.month, in.day, in.hour, in.minute, in.second,
|
||||
in.microsecond);
|
||||
rdcdatetime tmp = in;
|
||||
|
||||
// bounds check
|
||||
#define BOUND(prop, min, max) \
|
||||
if(tmp.prop < min) \
|
||||
tmp.prop = min; \
|
||||
if(tmp.prop > max) \
|
||||
tmp.prop = max;
|
||||
|
||||
BOUND(year, 1, 9999);
|
||||
BOUND(month, 1, 12);
|
||||
BOUND(day, 1, 31);
|
||||
BOUND(hour, 0, 23);
|
||||
BOUND(minute, 0, 59);
|
||||
BOUND(second, 0, 59);
|
||||
BOUND(microsecond, 0, 999999);
|
||||
|
||||
return PyDateTime_FromDateAndTime(tmp.year, tmp.month, tmp.day, tmp.hour, tmp.minute,
|
||||
tmp.second, tmp.microsecond);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user