3222b9728d9f07cbce611ba6c57ef0d640d033a6,src/python/pants/backend/python/lint/flake8/rules_integration_test.py,,test_type_stubs,#Any#,196

Before Change



def test_type_stubs(rule_runner: RuleRunner) -> None:
    Ensure that running over a type stub file doesn"t cause issues.
    type_stub = FileContent("good.pyi", b"def add(x: int, y: int) -> int:\n    return x + y\n")
    // First check when the stub has no sibling `.py` file.
    target = make_target(rule_runner, [type_stub])
    assert_success(rule_runner, target)
    // Then check with a sibling `.py`.
    target = make_target(rule_runner, [GOOD_SOURCE, type_stub])
    assert_success(rule_runner, target)

After Change


    ]
    result = run_flake8(rule_runner, tgts)
    assert len(result) == 1
    assert result[0].exit_code == 1
    assert "f.py:" not in result[0].stdout
    assert "f.pyi:1:1: F401" in result[0].stdout
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/flake8/rules_integration_test.py
Class Name:
Method Name: test_type_stubs


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/flake8/rules_integration_test.py
Class Name:
Method Name: test_type_stubs


Project Name: pantsbuild/pants
Commit Name: 4cc0da1c0d7a147b28913c3bb0c2f270ced70a87
Time: 2015-03-31
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/python/tasks/test_setup_py.py
Class Name: TestSetupPy
Method Name: test_pants_contrib_case


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/bandit/rules_integration_test.py
Class Name:
Method Name: test_type_stubs