Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ dotnet_diagnostic.CA1837.severity = suggestion # CA1837: Use 'Environment.Proce
dotnet_diagnostic.CA1838.severity = suggestion # CA1838: Avoid 'StringBuilder' parameters for P/Invokes
dotnet_diagnostic.CA1845.severity = none # CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer 'AsSpan' over 'Substring'
dotnet_diagnostic.CA1847.severity = none # CA1847: Use char literal for a single character lookup
dotnet_diagnostic.CA1847.severity = suggestion # CA1847: Use char literal for a single character lookup
dotnet_diagnostic.CA1852.severity = suggestion # CA1852: Seal internal types
dotnet_diagnostic.CA1854.severity = suggestion # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
dotnet_diagnostic.CA1859.severity = suggestion # CA1859: Use concrete types when possible for improved performance
Expand Down
17 changes: 17 additions & 0 deletions src/core/IronPython.Modules/IronPython.Modules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
<BaseAddress>885063680</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EmitCompilerGeneratedFiles>True</EmitCompilerGeneratedFiles>
<MeziantouPolyfill_IncludedPolyfills>
T:System.Diagnostics.CodeAnalysis.AllowNullAttribute;
T:System.Diagnostics.CodeAnalysis.DisallowNullAttribute;
T:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute;
T:System.Diagnostics.CodeAnalysis.NotNullAttribute;
T:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute;
T:System.Runtime.Versioning.SupportedOSPlatformAttribute;
M:System.String.EndsWith(System.Char);
</MeziantouPolyfill_IncludedPolyfills>
</PropertyGroup>

<ItemGroup Condition=" '$(IsFullFramework)' == 'true' ">
Expand Down Expand Up @@ -32,6 +42,13 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Meziantou.Polyfill" Version="1.0.120">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<Import Project="$(AfterTargetFiles)" />
<Target Name="AfterBuildEnds" AfterTargets="AfterBuild" DependsOnTargets="$(AfterTargets)" />

Expand Down
17 changes: 16 additions & 1 deletion src/core/IronPython/IronPython.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
<BaseAddress>879755264</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EmitCompilerGeneratedFiles>True</EmitCompilerGeneratedFiles>
<MeziantouPolyfill_IncludedPolyfills>
T:System.Diagnostics.CodeAnalysis.AllowNullAttribute;
T:System.Diagnostics.CodeAnalysis.DisallowNullAttribute;
T:System.Diagnostics.CodeAnalysis.MemberNotNullAttribute;
T:System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute;
T:System.Diagnostics.CodeAnalysis.NotNullAttribute;
T:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute;
T:System.Diagnostics.CodeAnalysis.NotNullWhenAttribute;
T:System.Runtime.Versioning.SupportedOSPlatformAttribute;
T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute;
M:System.String.StartsWith(System.Char);
M:System.String.EndsWith(System.Char);
M:System.String.Contains(System.Char);
</MeziantouPolyfill_IncludedPolyfills>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -50,7 +65,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nullable" Version="1.3.1">
<PackageReference Include="Meziantou.Polyfill" Version="1.0.120">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
5 changes: 0 additions & 5 deletions src/core/IronPython/Modules/_fileio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,5 @@ private void EnsureWritable() {

#endregion
}

#if !NETCOREAPP
private static bool Contains(this string str, char value)
=> str.IndexOf(value) != -1;
#endif
}
}
15 changes: 0 additions & 15 deletions src/core/IronPython/StringExtensions.cs

This file was deleted.

54 changes: 0 additions & 54 deletions src/core/IronPython/SystemRuntimeVersioning.cs

This file was deleted.