Skip to content

0.16.2 giving errors with ast #256

@j-emils

Description

@j-emils

After upgrading to version 0.16.2 I get the following error:

.pixi/envs/py311/lib/python3.11/site-packages/quantities/registry.py:82: in getitem
return self.__registry[label]
.pixi/envs/py311/lib/python3.11/site-packages/quantities/registry.py:32: in getitem
tree = ast.parse(string, mode="eval")


source = ' W', filename = '', mode = 'eval'
def parse(source, filename='', mode='exec', *,
type_comments=False, feature_version=None):
"""
Parse the source into an AST node.
Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
Pass type_comments=True to get back type comments where the syntax allows.
"""
flags = PyCF_ONLY_AST
if type_comments:
flags |= PyCF_TYPE_COMMENTS
if isinstance(feature_version, tuple):
major, minor = feature_version # Should be a 2-tuple.
assert major == 3
feature_version = minor
elif feature_version is None:
feature_version = -1

Else it should be an int giving the minor version for 3.x.

return compile(source, filename, mode, flags,
_feature_version=feature_version)
E File "", line 1
E W
E IndentationError: unexpected indent
.pixi/envs/py311/lib/python3.11/ast.py:50: IndentationError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions