Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/test_projects/minimal/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "test-project"
name = "minimal"
version = "0.1.0"
description = ""
description = "Tests actions/analyze-project with a minimal project that has no errors"
authors = [
{name = "Joel Dixon",email = "[email protected]"}
]
Expand Down
Empty file.
613 changes: 613 additions & 0 deletions .github/test_projects/mypy-errors/poetry.lock

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions .github/test_projects/mypy-errors/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[project]
name = "mypy-errors"
version = "0.1.0"
description = "Tests actions/analyze-project with a project that has mypy errors"
authors = [
{name = "Joel Dixon",email = "[email protected]"}
]
readme = "README.md"
requires-python = ">=3.9,<4.0"
dynamic = ["dependencies"]

[tool.poetry]
packages = [{include = "test_project", from = "src"}]

[tool.poetry.group.lint.dependencies]
ni-python-styleguide = ">=0.4.1"
mypy = ">=1.0"
pyright = { version = ">=1.1.400", extras = ["nodejs"] }

[tool.mypy]
mypy_path = "."
files = "."
namespace_packages = true
strict = true
explicit_package_bases = true

[tool.pyright]
include = ["src/", "tests/"]

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Docstring required."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Required docstring."""


def foo(x: int, y: int): # mypy error: Function is missing a return type annotation
"""Required docstring."""
print("Hello, world!")
return x + y


foo(1, 2)
1 change: 1 addition & 0 deletions .github/test_projects/mypy-errors/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Module docstring."""
Empty file.
613 changes: 613 additions & 0 deletions .github/test_projects/ni-python-styleguide-errors/poetry.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[project]
name = "ni-python-styleguide-errors"
version = "0.1.0"
description = "Tests actions/analyze-project with a project that has ni-python-styleguide errors"
authors = [
{name = "Joel Dixon",email = "[email protected]"}
]
readme = "README.md"
requires-python = ">=3.9,<4.0"
dynamic = ["dependencies"]

[tool.poetry]
packages = [{include = "test_project", from = "src"}]

[tool.poetry.group.lint.dependencies]
ni-python-styleguide = ">=0.4.1"
mypy = ">=1.0"
pyright = { version = ">=1.1.400", extras = ["nodejs"] }

[tool.mypy]
mypy_path = "."
files = "."
namespace_packages = true
strict = true
explicit_package_bases = true

[tool.pyright]
include = ["src/", "tests/"]

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Docstring required."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import os, sys # Multiple imports on one line (E401)

def foo( x: int , y: int ) -> int: # Spaces around parameters (E211, E251)
print( "Hello, world!" ) # Unnecessary spaces inside parentheses (E201, E202)
return x+y # Missing whitespace around operator (E225)

foo(1,2)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Module docstring."""
Empty file.
Loading
Loading