Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FixUop.replicated definition incases_generator/analyzer.py #134294

Open
Assignees
sobolevn
Labels
buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error
@sobolevn

Description

@sobolevn

Bug report

It is now defined as:

And used as:

forannoinop.annotations:
ifanno.startswith("replicate"):
result.replicated=int(anno[10:-1])
break
else:
returnresult

But, right nowreplicated is a class-level variable of a dataclass, because it does not have an annotation, see:

>>>fromdataclassesimportdataclass>>>@dataclass...classUop:...replicated=0...>>>Uop(replicated=1)Traceback (mostrecentcalllast):File"<python-input-2>",line1,in<module>Uop(replicated=1)~~~^^^^^^^^^^^^^^TypeError:Uop.__init__()gotanunexpectedkeywordargument'replicated'

I have a PR with the fix.

Refs626c414

Linked PRs

Metadata

Metadata

Assignees

Labels

buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp