Skip to content

Commit d1241f8

Browse files
committed
Clean-up attribute names and paranthesis
1 parent 049a61f commit d1241f8

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

src/runtime/converter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Python.Runtime
1010
/// <summary>
1111
/// Performs data conversions between managed types and Python types.
1212
/// </summary>
13-
[SuppressUnmanagedCodeSecurityAttribute()]
13+
[SuppressUnmanagedCodeSecurity]
1414
internal class Converter
1515
{
1616
private Converter()

src/runtime/interop.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Python.Runtime
1212
/// runtime. Generally, the definitions here need to be kept up to date
1313
/// when moving to new Python versions.
1414
/// </summary>
15-
[Serializable()]
15+
[Serializable]
1616
[AttributeUsage(AttributeTargets.All)]
1717
public class DocStringAttribute : Attribute
1818
{
@@ -30,7 +30,7 @@ public string DocString
3030
private string docStr;
3131
}
3232

33-
[Serializable()]
33+
[Serializable]
3434
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate)]
3535
internal class PythonMethodAttribute : Attribute
3636
{
@@ -39,7 +39,7 @@ public PythonMethodAttribute()
3939
}
4040
}
4141

42-
[Serializable()]
42+
[Serializable]
4343
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate)]
4444
internal class ModuleFunctionAttribute : Attribute
4545
{
@@ -48,7 +48,7 @@ public ModuleFunctionAttribute()
4848
}
4949
}
5050

51-
[Serializable()]
51+
[Serializable]
5252
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate)]
5353
internal class ForbidPythonThreadsAttribute : Attribute
5454
{
@@ -58,7 +58,7 @@ public ForbidPythonThreadsAttribute()
5858
}
5959

6060

61-
[Serializable()]
61+
[Serializable]
6262
[AttributeUsage(AttributeTargets.Property)]
6363
internal class ModulePropertyAttribute : Attribute
6464
{

src/runtime/moduleobject.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -349,34 +349,34 @@ internal void InitializePreload()
349349
}
350350
}
351351

352-
[ModuleFunctionAttribute]
352+
[ModuleFunction]
353353
public static bool getPreload()
354354
{
355355
return preload;
356356
}
357357

358-
[ModuleFunctionAttribute]
358+
[ModuleFunction]
359359
public static void setPreload(bool preloadFlag)
360360
{
361361
preload = preloadFlag;
362362
}
363363

364-
//[ModulePropertyAttribute]
364+
//[ModuleProperty]
365365
public static bool SuppressDocs
366366
{
367367
get { return _SuppressDocs; }
368368
set { _SuppressDocs = value; }
369369
}
370370

371-
//[ModulePropertyAttribute]
371+
//[ModuleProperty]
372372
public static bool SuppressOverloads
373373
{
374374
get { return _SuppressOverloads; }
375375
set { _SuppressOverloads = value; }
376376
}
377377

378-
[ModuleFunctionAttribute]
379-
[ForbidPythonThreadsAttribute]
378+
[ModuleFunction]
379+
[ForbidPythonThreads]
380380
public static Assembly AddReference(string name)
381381
{
382382
AssemblyManager.UpdatePath();
@@ -402,15 +402,15 @@ public static Assembly AddReference(string name)
402402
return assembly;
403403
}
404404

405-
[ModuleFunctionAttribute]
406-
[ForbidPythonThreadsAttribute]
405+
[ModuleFunction]
406+
[ForbidPythonThreads]
407407
public static string FindAssembly(string name)
408408
{
409409
AssemblyManager.UpdatePath();
410410
return AssemblyManager.FindAssembly(name);
411411
}
412412

413-
[ModuleFunctionAttribute]
413+
[ModuleFunction]
414414
public static string[] ListAssemblies(bool verbose)
415415
{
416416
AssemblyName[] assnames = AssemblyManager.ListAssemblies();
@@ -429,7 +429,7 @@ public static string[] ListAssemblies(bool verbose)
429429
return names;
430430
}
431431

432-
[ModuleFunctionAttribute]
432+
[ModuleFunction]
433433
public static int _AtExit()
434434
{
435435
return Runtime.AtExit();

src/runtime/runtime.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace Python.Runtime
77
{
8-
[SuppressUnmanagedCodeSecurity()]
8+
[SuppressUnmanagedCodeSecurity]
99
static class NativeMethods
1010
{
1111
#if MONO_LINUX || MONO_OSX

0 commit comments

Comments
 (0)