8000 [PyCDE] Fix invalid `inputs` function by mortbopet · Pull Request #8507 · llvm/circt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[PyCDE] Fix invalid inputs function #8507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2025
Merged

Conversation

mortbopet
Copy link
Contributor

This might just have been some outdated code.

The previous inputs function had an incorrect type annotation (i.e. it defers to the following code:

  @property
  def inputs(self) -> List[Input]:
    return [p for p in self.ports if isinstance(p, Input)]

Might as well return that list instead of reducing it to a dictionary.

Secondly, also adds a (presumably) missing outputs method.

This might just have been some outdated code.

The previous `inputs` function had an incorrect type annotation (i.e. it defers to the following code:
```python
  @Property
  def inputs(self) -> List[Input]:
    return [p for p in self.ports if isinstance(p, Input)]
```
Might as well return that list instead of reducing it to a dictionary.

Secondly, also adds a (presumably) missing `outputs` method.
@mortbopet mortbopet requested a review from teqdruid May 22, 2025 13:43
@teqdruid
Copy link
Contributor

Secondly, also adds a (presumably) missing outputs method.

I didn't add it since it wasn't needed and is thus untested.

Copy link
Contributor
@teqdruid teqdruid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there are a bunch of incorrect type hints and missing type hints all over PyCDE. See #7412

@mortbopet mortbopet merged commit afbae37 into main May 27, 2025
5 checks passed
@mortbopet mortbopet deleted the dev/mpetersen/pycde_mod_inputs branch May 27, 2025 07:08
Sign up for free to join this conver 5DC7 sation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0