Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private bool GenericClassParameterValid(IReadOnlyList<IGenericTypeDefinition> ge
Resources.GenericNotAllTypeParameters,
GetLocation(expr).Span,
ErrorCodes.TypingGenericArguments,
Severity.Error,
Severity.Warning,
DiagnosticSource.Analysis));
return false;
}
Expand All @@ -83,7 +83,7 @@ private bool GenericClassParameterValid(IReadOnlyList<IGenericTypeDefinition> ge
Resources.GenericNotAllUnique,
GetLocation(expr).Span,
ErrorCodes.TypingGenericArguments,
Severity.Error,
Severity.Warning,
DiagnosticSource.Analysis));
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Analysis/Ast/Impl/Analyzer/Symbols/ClassEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private void ReportInvalidBase(string argVal) {
Resources.InheritNonClass.FormatInvariant(argVal),
_classDef.NameExpression.GetLocation(Eval)?.Span ?? default,
Diagnostics.ErrorCodes.InheritNonClass,
Severity.Error,
Severity.Warning,
DiagnosticSource.Analysis
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static bool TypeVarArgumentsValid(IArgumentSet argSet) {
new DiagnosticsEntry(Resources.TypeVarSingleConstraint,
callLocation?.Span ?? default,
Diagnostics.ErrorCodes.TypingTypeVarArguments,
Severity.Error, DiagnosticSource.Analysis)
Severity.Warning, DiagnosticSource.Analysis)
);
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private IPythonType CreateTypeAlias(IArgumentSet args) {
new DiagnosticsEntry(Resources.NewTypeFirstArgNotString.FormatInvariant(firstArgType),
expression?.GetLocation(eval)?.Span ?? default,
Diagnostics.ErrorCodes.TypingNewTypeArguments,
Severity.Error, DiagnosticSource.Analysis)
Severity.Warning, DiagnosticSource.Analysis)
);
}
// TODO: report wrong number of arguments
Expand Down
2 changes: 1 addition & 1 deletion src/Analysis/Ast/Test/LintNoQATests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public async Task VarNamedNoQAStillGivesDiagnostic() {
diagnostic.Message.Should().Be(Resources.GenericNotAllUnique);
diagnostic.ErrorCode.Should().Be(ErrorCodes.TypingGenericArguments);
diagnostic.SourceSpan.Should().Be(8, 8, 8, 21);
diagnostic.Severity.Should().Be(Severity.Error);
diagnostic.Severity.Should().Be(Severity.Warning);
}

[DataRow("x = y #noqa")]
Expand Down