Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd1241f8

Browse files
committed
Clean-up attribute names and paranthesis
1 parent049a61f commitd1241f8

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
internalclassConverter
1515
{
1616
privateConverter()

‎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
publicclassDocStringAttribute:Attribute
1818
{
@@ -30,7 +30,7 @@ public string DocString
3030
privatestringdocStr;
3131
}
3232

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

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

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

6060

61-
[Serializable()]
61+
[Serializable]
6262
[AttributeUsage(AttributeTargets.Property)]
6363
internalclassModulePropertyAttribute: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
publicstaticboolgetPreload()
354354
{
355355
returnpreload;
356356
}
357357

358-
[ModuleFunctionAttribute]
358+
[ModuleFunction]
359359
publicstaticvoidsetPreload(boolpreloadFlag)
360360
{
361361
preload=preloadFlag;
362362
}
363363

364-
//[ModulePropertyAttribute]
364+
//[ModuleProperty]
365365
publicstaticboolSuppressDocs
366366
{
367367
get{return_SuppressDocs;}
368368
set{_SuppressDocs=value;}
369369
}
370370

371-
//[ModulePropertyAttribute]
371+
//[ModuleProperty]
372372
publicstaticboolSuppressOverloads
373373
{
374374
get{return_SuppressOverloads;}
375375
set{_SuppressOverloads=value;}
376376
}
377377

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

405-
[ModuleFunctionAttribute]
406-
[ForbidPythonThreadsAttribute]
405+
[ModuleFunction]
406+
[ForbidPythonThreads]
407407
publicstaticstringFindAssembly(stringname)
408408
{
409409
AssemblyManager.UpdatePath();
410410
returnAssemblyManager.FindAssembly(name);
411411
}
412412

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

432-
[ModuleFunctionAttribute]
432+
[ModuleFunction]
433433
publicstaticint_AtExit()
434434
{
435435
returnRuntime.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
namespacePython.Runtime
77
{
8-
[SuppressUnmanagedCodeSecurity()]
8+
[SuppressUnmanagedCodeSecurity]
99
staticclassNativeMethods
1010
{
1111
#ifMONO_LINUX||MONO_OSX

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp