generated from jCloud/repository-template
chore: lint source code using Ruff
This commit is contained in:
35 files changed
+161
-130
No files matched your search
@@ -12,13 +12,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import Union
|
||||
import ast
|
||||
|
||||
__all__ = ['ast_node']
|
||||
|
||||
|
||||
def ast_node(statement: str) -> Union[ast.stmt, None]:
|
||||
def ast_node(statement: str) -> ast.stmt | None:
|
||||
"""
|
||||
Returns an AST node from the statement.
|
||||
|
||||
@@ -26,7 +25,7 @@ def ast_node(statement: str) -> Union[ast.stmt, None]:
|
||||
:type statement: str
|
||||
|
||||
:return: The node.
|
||||
:rtype: Union[ast.stmt, None]
|
||||
:rtype: ast.stmt | None
|
||||
"""
|
||||
|
||||
body = ast.parse(statement).body
|
||||
|
||||
Reference in new issue
Block a user