Skip to content

Commit

Permalink
feat: StubsIgnoreAttribute for ignoring members or classes by the stu…
Browse files Browse the repository at this point in the history
…bs generator
  • Loading branch information
jhonabreul committed Apr 11, 2024
1 parent cb80153 commit 7eb082c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Algorithm/UniverseDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
using System;
using System.Linq;
using Python.Runtime;
using QuantConnect.Data;
using System.Collections.Generic;
using QuantConnect.Data.Fundamental;
using QuantConnect.Data.UniverseSelection;
Expand All @@ -39,6 +38,7 @@ public class UniverseDefinitions
/// <summary>
/// Specifies that universe selection should not make changes on this iteration
/// </summary>
[StubsIgnore]
public Universe.UnchangedUniverse Unchanged => Universe.Unchanged;

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Common/Data/UniverseSelection/Universe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public abstract class Universe : IDisposable
/// <summary>
/// Gets a value indicating that no change to the universe should be made
/// </summary>
[StubsIgnore]
public static readonly UnchangedUniverse Unchanged = UnchangedUniverse.Instance;

/// <summary>
Expand Down
27 changes: 27 additions & 0 deletions Common/StubsIgnoreAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using System;

namespace QuantConnect
{
/// <summary>P
/// Custom attribute used for marking classes, methods, properties, etc. that should be ignored by the stubs generator
/// </summary>
[AttributeUsage(AttributeTargets.All)]
public sealed class StubsIgnoreAttribute : Attribute
{
}
}

0 comments on commit 7eb082c

Please sign in to comment.