From 2e9bd86854a6204d88724bb48e5e0cfaf1c4f772 Mon Sep 17 00:00:00 2001 From: James Dunkerley Date: Wed, 20 Dec 2023 17:25:43 +0000 Subject: [PATCH] Small linting fixes. (#8592) --- .../lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso | 6 +++++- .../Base/0.0.0-dev/src/Data/XML/XML_Format.enso | 3 ++- .../lib/Standard/Base/0.0.0-dev/src/Error.enso | 2 +- .../Base/0.0.0-dev/src/Errors/Wrapped_Error.enso | 2 +- .../0.0.0-dev/src/Internal/Array_Like_Helpers.enso | 2 +- .../Base/0.0.0-dev/src/Network/HTTP/HTTP_Error.enso | 2 +- .../Table/0.0.0-dev/src/Excel/Excel_Workbook.enso | 10 ++++++---- .../Table/0.0.0-dev/src/Internal/Problem_Builder.enso | 2 +- 8 files changed, 18 insertions(+), 11 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso index 31a47e29d0..fc6e0bf252 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Vector.enso @@ -1355,11 +1355,13 @@ type Builder ## PRIVATE Describes an error produced by a function mapped over a Vector. Includes the - funtion argument's position in the vector. + function argument's position in the vector. An error that is wrapped as a `Map_Error` can be caught as a `Map_Error`, or as itself. In the latter case, the `Map_Error` wrapper is stripped off. type Map_Error + ## PRIVATE + Creates a new `Map_Error` from the given index and underlying error. Error (index:Integer) inner_error ## PRIVATE @@ -1369,8 +1371,10 @@ type Map_Error ## PRIVATE Indicates that a method should not wrap thrown errors in `Map_Error`. type No_Wrap + ## PRIVATE Value +## PRIVATE Wrapped_Error.from (that : Map_Error) = Wrapped_Error.Value that that.inner_error ## PRIVATE diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML/XML_Format.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML/XML_Format.enso index 159ab88f94..9ef57df618 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML/XML_Format.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML/XML_Format.enso @@ -1,3 +1,5 @@ +import Standard.Base.System.File_Format.File_Format_Metadata + import project.Any.Any import project.Data.Text.Text import project.Data.XML.XML_Document @@ -6,7 +8,6 @@ import project.Network.URI.URI import project.Nothing.Nothing import project.System.File.File import project.System.File_Format.File_For_Read -import Standard.Base.System.File_Format.File_Format_Metadata import project.System.Input_Stream.Input_Stream from project.Data.Text.Extensions import all diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Error.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Error.enso index 67c36301d0..d218148ac5 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Error.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Error.enso @@ -1,12 +1,12 @@ import project.Any.Any import project.Data.Maybe.Maybe +import project.Data.Pair.Pair import project.Data.Text.Text import project.Data.Vector.Vector import project.Errors.Common.No_Such_Conversion import project.Errors.Wrapped_Error.Wrapped_Error import project.Meta import project.Nothing.Nothing -import project.Data.Pair.Pair import project.Panic.Panic import project.Runtime.Stack_Trace_Element from project.Data.Boolean import Boolean, False, True diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Wrapped_Error.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Wrapped_Error.enso index d5bef86e58..2b3cdb48ed 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Wrapped_Error.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Wrapped_Error.enso @@ -6,10 +6,10 @@ import project.Data.Text.Text See `Error.catch` for details about error wrapping. type Wrapped_Error + ## PRIVATE Value wrapping_error inner_error ## PRIVATE - Create a human-readable version of the error. to_display_text : Text to_display_text self = diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso index 93582456a8..ecab5b5b40 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Array_Like_Helpers.enso @@ -7,8 +7,8 @@ import project.Data.Numbers.Integer import project.Data.Vector.Map_Error import project.Data.Vector.No_Wrap import project.Data.Vector.Vector -import project.Errors.Common.Additional_Warnings import project.Error.Error +import project.Errors.Common.Additional_Warnings import project.Errors.Problem_Behavior.Problem_Behavior import project.Errors.Unimplemented.Unimplemented import project.Nothing.Nothing diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Error.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Error.enso index 745d4fc023..f338eeca36 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Error.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Network/HTTP/HTTP_Error.enso @@ -1,8 +1,8 @@ import project.Any.Any import project.Data.Text.Text +import project.Network.HTTP.HTTP_Status_Code.HTTP_Status_Code import project.Network.URI.URI import project.Network.URI_With_Query.URI_With_Query -import project.Network.HTTP.HTTP_Status_Code.HTTP_Status_Code import project.Nothing.Nothing import project.Panic.Panic diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso index ac655104aa..150f7d5a32 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Excel/Excel_Workbook.enso @@ -5,8 +5,8 @@ import Standard.Base.Errors.Illegal_State.Illegal_State import Standard.Base.Metadata.Display import Standard.Base.Runtime.Managed_Resource.Managed_Resource import Standard.Base.Runtime.Ref.Ref -import Standard.Base.System.Input_Stream.Input_Stream import Standard.Base.System.File.Advanced.Temporary_File.Temporary_File +import Standard.Base.System.Input_Stream.Input_Stream from Standard.Base.Data.Filter_Condition import sql_like_to_regex from Standard.Base.Metadata.Choice import Option from Standard.Base.Metadata.Widget import Single_Choice @@ -19,10 +19,10 @@ import project.Internal.Java_Problems polyglot java import java.io.File as Java_File polyglot java import org.apache.poi.ss.usermodel.Workbook -polyglot java import org.enso.table.read.ExcelReader polyglot java import org.enso.table.excel.ExcelConnectionPool polyglot java import org.enso.table.excel.ExcelFileFormat polyglot java import org.enso.table.excel.ReadOnlyExcelConnection +polyglot java import org.enso.table.read.ExcelReader type Excel_Workbook ## PRIVATE @@ -240,7 +240,8 @@ type Excel_Workbook sheet self name:(Text | Integer) = self.read_section (Excel_Section.Worksheet name 0 Nothing) - ## ADVANCED + ## PRIVATE + ADVANCED Closes the workbook, releasing any resources it holds. This method may be used to release the underlying workbook file, @@ -257,7 +258,8 @@ type Excel_Workbook self.excel_connection_resource_ref.put Nothing Nothing - ## Returns a simple text description of the workbook. + ## PRIVATE + Returns a simple text description of the workbook. to_text : Text to_text self = associated_regular_file = case self.file of diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Problem_Builder.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Problem_Builder.enso index a94685a508..fb5e4062e0 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Problem_Builder.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Problem_Builder.enso @@ -2,7 +2,7 @@ from Standard.Base import all import Standard.Base.Runtime.Ref.Ref import project.Internal.Vector_Builder.Vector_Builder -from project.Errors import Duplicate_Output_Column_Names, Invalid_Aggregate_Column, Invalid_Column_Names, Missing_Input_Columns, Truncated_Column_Names, No_Output_Columns +from project.Errors import Duplicate_Output_Column_Names, Invalid_Aggregate_Column, Invalid_Column_Names, Missing_Input_Columns, No_Output_Columns, Truncated_Column_Names ## PRIVATE type Problem_Builder