Skip to content

Is there a way to not fix a specific line? #5213

Answered by charliermarsh
Kludex asked this question in Q&A
Discussion options

You must be logged in to vote

I believe noqa is what you're looking for but I may be misunderstanding:

from __future__ import annotations

from typer import Typer

app = Typer()

@app.command()
def main(
    param: Union[str, None]  # noqa: UP007
):
    return potato(param)
    
def potato(a: str | None) -> str | None:  # 
    return a

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Kludex
Comment options

@charliermarsh
Comment options

Answer selected by Kludex
@Kludex
Comment options

@Kludex
Comment options

@charliermarsh
Comment options

@Kludex
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants