Skip to content

Commit 2d83294

Browse files
committed
Add NotNone to params
1 parent 51977a8 commit 2d83294

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/core/IronPython.Modules/msvcrt.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
using IronPython.Runtime;
2222
using IronPython.Runtime.Operations;
2323

24-
2524
#if FEATURE_PIPES
2625
using System.IO.Pipes;
2726
#endif

src/core/IronPython/Runtime/Operations/ObjectOps.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ public static void __init__(CodeContext/*!*/ context, object self) { }
6565
/// <summary>
6666
/// Initializes the object. The base class does nothing.
6767
/// </summary>
68-
public static void __init__(CodeContext/*!*/ context, object self, params object[] args) {
68+
public static void __init__(CodeContext/*!*/ context, object self, [NotNone] params object[] args) {
6969
InstanceOps.CheckInitArgs(context, null, args, self);
7070
}
7171

7272
/// <summary>
7373
/// Initializes the object. The base class does nothing.
7474
/// </summary>
75-
public static void __init__(CodeContext/*!*/ context, object self, [ParamDictionary] IDictionary<object, object> kwargs, params object[] args) {
75+
public static void __init__(CodeContext/*!*/ context, object self, [ParamDictionary] IDictionary<object, object> kwargs, [NotNone] params object[] args) {
7676
InstanceOps.CheckInitArgs(context, kwargs, args, self);
7777
}
7878

@@ -92,7 +92,7 @@ public static object __new__(CodeContext/*!*/ context, PythonType cls) {
9292
/// Creates a new instance of the type
9393
/// </summary>
9494
[StaticExtensionMethod]
95-
public static object __new__(CodeContext/*!*/ context, PythonType cls, params object[] args) {
95+
public static object __new__(CodeContext/*!*/ context, PythonType cls, [NotNone] params object[] args) {
9696
if (cls == null) {
9797
throw PythonOps.TypeError("__new__ expected type object, got {0}", PythonOps.Repr(context, DynamicHelpers.GetPythonType(cls)));
9898
}
@@ -106,7 +106,7 @@ public static object __new__(CodeContext/*!*/ context, PythonType cls, params ob
106106
/// Creates a new instance of the type
107107
/// </summary>
108108
[StaticExtensionMethod]
109-
public static object __new__(CodeContext/*!*/ context, PythonType cls, [ParamDictionary] IDictionary<object, object> kwargs, params object[] args) {
109+
public static object __new__(CodeContext/*!*/ context, PythonType cls, [ParamDictionary] IDictionary<object, object> kwargs, [NotNone] params object[] args) {
110110
if (cls == null) {
111111
throw PythonOps.TypeError("__new__ expected type object, got {0}", PythonOps.Repr(context, DynamicHelpers.GetPythonType(cls)));
112112
}

src/core/IronPython/Runtime/Operations/StringOps.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ public static string zfill([NotNone] this string self, int width) {
13191319
///
13201320
/// Conversion can be 'r' for repr or 's' for string.
13211321
/// </summary>
1322-
public static string/*!*/ format(CodeContext/*!*/ context, [NotNone] string format_string\u00F8, [ParamDictionary] IDictionary<object, object> kwargs, params object[] args) {
1322+
public static string/*!*/ format(CodeContext/*!*/ context, [NotNone] string format_string\u00F8, [ParamDictionary] IDictionary<object, object> kwargs, [NotNone] params object[] args) {
13231323
return NewStringFormatter.FormatString(
13241324
context.LanguageContext,
13251325
format_string\u00F8,

0 commit comments

Comments
 (0)