Package org.openrewrite.python.marker
Enum Class PythonExtraPadding.Location
java.lang.Object
java.lang.Enum<PythonExtraPadding.Location>
org.openrewrite.python.marker.PythonExtraPadding.Location
- All Implemented Interfaces:
Serializable,Comparable<PythonExtraPadding.Location>,Constable
- Enclosing class:
- PythonExtraPadding
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe method and class models don't support right-padding of decorators.if someCondition⇒ passSome Python containers (like dict literals) can have space between the initialization delimiters but lack the space for it in the model.Imports can optionally be wrapped in parens.Imports can optionally be wrapped in parens.Some Python operators have space within the operator itself. -
Method Summary
Modifier and TypeMethodDescriptionstatic PythonExtraPadding.LocationReturns the enum constant of this class with the specified name.static PythonExtraPadding.Location[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AFTER_DECORATOR
The method and class models don't support right-padding of decorators. In Python, they're padded like statements and must be newline-terminated. It's more natural to store trailing padding (which is unusual) with the decorator rather than with the next sibling.\@foo⇒❘ # a comment❘⇐ \@bar def method(): pass -
BEFORE_COMPOUND_BLOCK_COLON
if someCondition⇒ pass -
IMPORT_PARENS_PREFIX
Imports can optionally be wrapped in parens.from math import⇒ sin, cos ) -
IMPORT_PARENS_SUFFIX
Imports can optionally be wrapped in parens.from math import ( sin, cos⇒ ) -
WITHIN_OPERATOR_NAME
Some Python operators have space within the operator itself.if x is⇒ not y: pass -
EMPTY_INITIALIZER
Some Python containers (like dict literals) can have space between the initialization delimiters but lack the space for it in the model.xs = {⇒ }
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-