Skip to content
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

[Bug]: Cookiecutter doesn't pass mypy for post_process method signature #1224

Closed
visch opened this issue Nov 28, 2022 · 2 comments
Closed

[Bug]: Cookiecutter doesn't pass mypy for post_process method signature #1224

visch opened this issue Nov 28, 2022 · 2 comments
Labels

Comments

@visch
Copy link
Contributor

visch commented Nov 28, 2022

Singer SDK Version

0.14.0

Python Version

3.8

Bug scope

Taps (catalog, state, stream maps, etc.)

Operating System

Ubuntu

Description

lint run-test: commands[5] | poetry run mypy tap_messagebird --exclude=tap_messagebird/tests        
tap_messagebird/client.py:77: error: Signature of "post_process" incompatible with supertype "Stream"    

This is generated from https://github.com/meltano/sdk/blob/main/cookiecutter/tap-template/%7B%7Bcookiecutter.tap_id%7D%7D/%7B%7Bcookiecutter.library_name%7D%7D/%7B%25if%20'REST'%20%3D%3D%20cookiecutter.stream_type%20%25%7Dclient.py%7B%25endif%25%7D#L141

To fix change the signature to

def post_process(self, row: dict, context: dict | None = None) -> dict | None:

And import annotations from future (if using a python version without those types)

from __future__ import annotations

Bump to #993

Code

No response

@stale
Copy link

stale bot commented Jul 18, 2023

This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.

@stale stale bot added the stale label Jul 18, 2023
@edgarrmondragon
Copy link
Collaborator

Closed by #1648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants