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

reportUnusedFunction should not consider tests #540

Open
KotlinIsland opened this issue Aug 1, 2024 · 1 comment
Open

reportUnusedFunction should not consider tests #540

KotlinIsland opened this issue Aug 1, 2024 · 1 comment
Labels
config issues relating to config (pyproject.toml, pyrightconfig.json, LSP config or vscode extension) type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules

Comments

@KotlinIsland
Copy link
Collaborator

KotlinIsland commented Aug 1, 2024

def _f(): ...

def test_f():
    _f()

i would expect this to report that _f() is unused, maybe this should be configurable? would need a way to specify what a test is

@KotlinIsland KotlinIsland added type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules config issues relating to config (pyproject.toml, pyrightconfig.json, LSP config or vscode extension) labels Aug 1, 2024
@DetachHead
Copy link
Owner

DetachHead commented Aug 1, 2024

it should be configurable so it depends on #539, and when running in "application" mode (ie. not a library), it should also report unused public functions as well as not count usages in tests. this functionality would also need to rely on #311 i guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config issues relating to config (pyproject.toml, pyrightconfig.json, LSP config or vscode extension) type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules
Projects
None yet
Development

No branches or pull requests

2 participants