mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
Update python intentions' descriptions (PY-48274)
GitOrigin-RevId: 2bd596ec3f37c94303661b2aa416970aafc03ab6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
aec141b5da
commit
cb8716794e
@@ -1,7 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention replaces a string format operator with the equivalent 'format' method call.
|
||||
</span>
|
||||
Replaces a string format operator with the equivalent <code>format</code> method call.</span>
|
||||
<br/>
|
||||
<span>See <a href="https://docs.python.org/3/tutorial/inputoutput.html#the-string-format-method">String format() method</a> for more
|
||||
details.</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention replaces variadic parameter(s) with usual.
|
||||
</span>
|
||||
<span>Replaces <i>variadic</i> parameters with usual.</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +1,13 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention transforms <code>from module_name import ...</code> into <code>import module_name</code>
|
||||
and qualifies any names imported from that module by module name.
|
||||
Transforms <code>from module_name import</code> into <code>import module_name</code>
|
||||
and qualifies any names imported from that module by module name.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
With the <code>import module_name</code> statement, you do not need to update
|
||||
any <code>from module_name import</code> statement
|
||||
to start using another item from the same module.</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +1,14 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention replaces <code>import foo</code> with <code>from foo import ...</code>
|
||||
and drop qualifiers at references to names from <code>foo</code>.
|
||||
Replaces <code>import module_name</code> with
|
||||
<code>from module_name import</code>
|
||||
and drop qualifiers at references to names from <code>module_name</code>.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
Using <code>from module_name import</code> ensures better control over which
|
||||
items of a <code>module_name</code> can be accessed.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention allows to add or remove an alias from an import element, renaming references accordingly.
|
||||
Allows to add or remove an alias from an import element, renaming references accordingly.
|
||||
Works both for <code>import ... as ...</code> and <code>from ... import ... as</code> statements.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
Using aliases in import statements can be helpful when you often reference modules with
|
||||
long names.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention replaces absolute <code>from</code> import with a relative one.
|
||||
Replaces absolute <code>from</code> import with a relative one.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
Note that relative imports work only within the current source root. You cannot relatively
|
||||
import a package from another source root.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +1,15 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention used to specify annotations for parameters and return type of a function.
|
||||
<p/>
|
||||
Specifies annotations for parameters and return type of a function.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
If there is type information collected in run-time, it is used to set the default values of types.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
Refer to <a href="https://www.python.org/dev/peps/pep-0484/">PEP-484</a> for more details about type hints.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>This intention adds type hints for variables in PEP 484 compatible format.</span>
|
||||
<!-- tooltip end -->
|
||||
<span>Adds type hints for variables in <a href="https://www.python.org/dev/peps/pep-0484/">PEP 484</a>
|
||||
compatible format.</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,12 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts lambda function to function definition statement.
|
||||
Converts a lambda function to a function definition statement.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
This action might be helpful when you want to have a function with a name and
|
||||
specify some docstrings for it.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts tuples and set literals to list literals.
|
||||
Converts tuples and set literals to list literals.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
This action is recommended by the IDE when assignment to a tuple is detected.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts tuples and list literals to set literals.
|
||||
Сonverts tuples and list literals to set literals.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts list literals and set literals to tuples.
|
||||
Converts list literals and set literals to tuples. You can use this intention action if using a tuple better suites your application needs. For example, when you need to store non homogeneous values.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts method to property.
|
||||
<span>Converts a method to a property.</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts static method to function.
|
||||
<span>
|
||||
Converts a static method to a function. It worths converting to a function if a method doesn't need access to the class or its instance.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts string formatting via format() method and format
|
||||
operator to Python 3.6 f-string literals.
|
||||
<span>
|
||||
This intention converts string formatting via <code>format()</code> method and format operator to Python 3.6 f-string literals.
|
||||
</span>
|
||||
<!-- tooltip end -->
|
||||
<span>
|
||||
F-strings provide a way to embed expressions inside string literals, using a minimal syntax. See more details in <a href="https://www.python.org/dev/peps/pep-0498/">PEP-498</a>.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts triple-quoted string to single-quoted.
|
||||
Converts a triple-quoted string to a single-quoted string.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention convert PEP-484 type comments to Python 3.6 variable annotations.
|
||||
Converts <a href="https://www.python.org/dev/peps/pep-0484/">PEP-484</a> type comments to Python 3.6 <a href="https://www.python.org/dev/peps/pep-0526/">variable annotations</a>.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,14 +1,14 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention replaces either</span>
|
||||
Applies <a href="https://en.wikipedia.org/wiki/De_Morgan%27s_laws">De Morgan's law</a> by replacing either</span>
|
||||
<pre>
|
||||
<b>a or b</b> with <b>not(not a and not b)</b> or
|
||||
<b>a and b</b> with <b>not(not a or not b)</b>
|
||||
</pre>
|
||||
|
||||
<span>
|
||||
inside boolean expression.
|
||||
inside a boolean expression.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts translation from dict constructor to dict literal form.
|
||||
Сonverts translation from a dict constructor to a dict literal form. This intention can be useful in situations when you need to rewrite dictionary creation by using a dictionary literal.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts translation from dict literal form to dict constructor.
|
||||
Converts translation from a dict literal form to a dict constructor.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention swaps the operands of a comparison expression.
|
||||
Transposes the operands of a comparison expression.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention generates documentation string stub.
|
||||
Generates a docstring stub.
|
||||
</span><br/>
|
||||
<span>
|
||||
See more details in
|
||||
<a href="https://www.jetbrains.com/help/pycharm/creating-documentation-comments.html#create_pydoc_qf">Create docstring for a Python function using intention action</a>
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention inverts <code>if</code> condition branches.
|
||||
Inverts the <code>if</code> condition branches.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts two nested if statements into one if statement containing conjuction operation in it.
|
||||
Converts two nested <code>if</code> statements into one <code>if</code> statement containing a conjunction operation in it.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts boolean comparison expression <b>not(a negop b)</b> into <b>a op b</b>.
|
||||
Where <code>op</code> and <code>negop</code> are mutually inverse comparison operators, like <b>==</b> and <b>!=</b>.
|
||||
This intention converts a boolean comparison expression <code>not(a negop b)</code> into <code>a op b</code>.
|
||||
Where <code>op</code> and <code>negop</code> are mutually inverse comparison operators, like <code>==</code> and <code>!=</code>.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention allows conversion between single-quoted and double-quoted strings.
|
||||
Converts single-quoted strings to double-quoted strings and vice versa.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,5 +3,11 @@
|
||||
<span>
|
||||
This intention replaces relative <code>from</code> import with an absolute one.
|
||||
</span>
|
||||
<br/>
|
||||
<span>
|
||||
Note that relative imports work only within the current source root. You cannot relatively
|
||||
import a package from another source root. So, absolute imports are preferred
|
||||
if the current location of the import statement may change.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention converts if statement containing conjunction operation into two nested if statements with simplified conditions.
|
||||
Converts an <code>if</code> statement containing conjunction operation into two nested <code>if</code> statements with simplified conditions.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1 @@
|
||||
"a%sc" % (b)
|
||||
"a{0}c".format(b)
|
||||
@@ -1,8 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention replaces a string concatenation with the equivalent expression with string formatting operator usage
|
||||
or with str.format() method call (for Python versions >= 2.7).
|
||||
Transforms a string concatenation to the equivalent expression with a <code>str.format()</code> method call.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention transforms conditional expression into if/else statement.
|
||||
Transforms a conditional expression into the <code>if/else</code> statement.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention transforms explicit iteration with 'yield' into 'yield from'.
|
||||
Transforms explicit iteration with <code>yield</code> into the <code>yield from</code> expression.
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention replaces a list comprehension with for loop.
|
||||
Replaces a list comprehension with the <code>for</code> loop.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention used to specify type for expression in docstring.
|
||||
Specifies type for expression in docstrings.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention used to specify type for expression in Python 3 using type annotations.
|
||||
Specifies type for expression in Python 3 using type annotations.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention used to specify type for expression by assertion.
|
||||
Specifies type for expression by assertion.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<span>
|
||||
This intention wraps selected template part with {% trans %} tag.
|
||||
Wraps the selected template part with the <code>{% trans %}</code> tag.
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -188,7 +188,7 @@ INTN.convert.to.plain.import=Convert to ''import {0}''
|
||||
|
||||
INTN.convert.except.to=Convert 'except exceptClass, Target' to 'except exceptClass as Target'
|
||||
|
||||
INTN.NAME.toggle.import.alias=Toggle import alias
|
||||
INTN.NAME.toggle.import.alias=Switch using import aliases
|
||||
INTN.add.import.alias=Add alias
|
||||
INTN.add.import.alias.to.name=Add alias to ''{0}''
|
||||
INTN.add.import.alias.dialog.message=Alias for ''{0}'':
|
||||
@@ -210,17 +210,17 @@ INTN.convert.to.fstring.literal=Convert to f-string literal
|
||||
INTN.replace.with.method=Replace with str.format method call
|
||||
|
||||
# ConvertFormatOperatorToMethodIntention
|
||||
INTN.format.operator.to.method=Convert format operator usage to str.format method call
|
||||
INTN.format.operator.to.method=Convert format operator to 'str.format' method call
|
||||
|
||||
INTN.replace.list.comprehensions.with.for=Convert list comprehensions to for loop
|
||||
INTN.replace.list.comprehensions.with.for=Convert list comprehensions to 'for' loop
|
||||
|
||||
INTN.NAME.split.if=Split if
|
||||
INTN.NAME.split.if=Split 'if' statement
|
||||
INTN.split.if=Split into 2 'if' statements
|
||||
|
||||
INTN.NAME.negate.comparison=Negate comparison
|
||||
INTN.negate.comparison=Negate ''{0}'' to ''{1}''
|
||||
|
||||
INTN.string.concatenation.to.format=Replace string concatenation with format operator
|
||||
INTN.string.concatenation.to.format=Replace string concatenation with 'str.format'
|
||||
INTN.replace.plus.with.format.operator=Replace + with string formatting operator
|
||||
INTN.replace.plus.with.str.format=Replace + with str.format method call
|
||||
|
||||
@@ -229,19 +229,19 @@ INTN.NAME.flip.comparison=Flip comparison
|
||||
INTN.flip.comparison=Flip ''{0}''
|
||||
INTN.flip.comparison.to.operator=Flip ''{0}'' to ''{1}''
|
||||
|
||||
INTN.NAME.join.if=Join if's
|
||||
INTN.join.if=Join two if's
|
||||
INTN.NAME.join.if=Join 'if' statements
|
||||
INTN.join.if=Join two 'if' statements
|
||||
|
||||
INTN.convert.dict.constructor.to.dict.literal=Convert dict constructor to dict literal form
|
||||
INTN.convert.dict.constructor.to.dict.literal=Convert dict constructor to dict literal
|
||||
INTN.convert.dict.literal.to.dict.constructor=Convert dict literal to dict constructor
|
||||
|
||||
INTN.quoted.string=Convert between single-quoted and double-quoted strings
|
||||
INTN.quoted.string=Convert single-quoted to double-quoted strings and vice versa
|
||||
INTN.quoted.string.single.to.double=Convert single-quoted string to double-quoted string
|
||||
INTN.quoted.string.double.to.single=Convert double-quoted string to single-quoted string
|
||||
|
||||
INTN.convert.lambda.to.function=Convert lambda to function
|
||||
|
||||
INTN.convert.variadic.param=Convert from variadic to normal parameter(s)
|
||||
INTN.convert.variadic.param=Convert variadic parameters to normal
|
||||
|
||||
# PyConvertTripleQuotedStringIntention
|
||||
INTN.triple.quoted.string=Convert triple-quoted string to single-quoted string
|
||||
@@ -254,13 +254,13 @@ INTN.convert.collection.literal=Convert {0} to {1}
|
||||
INTN.NAME.convert.type.comment.to.variable.annotation=Convert type comment to variable annotation
|
||||
INTN.convert.type.comment.to.variable.annotation=Convert to a variable annotation
|
||||
|
||||
INTN.NAME.demorgan.law=DeMorgan law
|
||||
INTN.NAME.demorgan.law=De Morgan's law
|
||||
|
||||
# PyTransformConditionalExpressionIntention
|
||||
INTN.transform.into.if.else.statement=Transform conditional expression into the if/else statement
|
||||
INTN.transform.into.if.else.statement=Transform conditional expressions into 'if/else' statements
|
||||
|
||||
# PyGenerateDocstringIntention
|
||||
INTN.NAME.insert.docstring.stub=Insert documentation string stub
|
||||
INTN.NAME.insert.docstring.stub=Insert docstring stub
|
||||
INTN.insert.docstring.stub=Insert a documentation string stub
|
||||
INTN.add.parameters.to.docstring=Add parameters to docstring
|
||||
|
||||
@@ -287,7 +287,7 @@ INTN.add.type.hint.for.variable.PEP484.incompatible.type=Type ''{0}'' cannot be
|
||||
INTN.insert.assertion=Insert type assertion
|
||||
|
||||
#PyYieldFromIntention
|
||||
INTN.yield.from=Transform explicit iteration with 'yield' into 'yield from' expression
|
||||
INTN.yield.from=Transform explicit iterations with 'yield' into 'yield from' expressions
|
||||
|
||||
#PyConvertStaticMethodToFunctionIntention
|
||||
INTN.convert.static.method.to.function=Convert static method to function
|
||||
|
||||
Reference in New Issue
Block a user