Skip to content

Commit

Permalink
Fix unit test and type hints. (sscpac#505)
Browse files Browse the repository at this point in the history
* Update cpplint unit test to match default warnings in latest major version release.
* Change default value of deep get method to match valid type for reduce function.
  • Loading branch information
tdenewiler authored Nov 4, 2024
1 parent 954fc18 commit a57a20c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ Removed support for Python 3.8.
- Fixed unit tests for groovylint tool plugin.
- Handle parsing issues when CodeNarcServer errors are present.
- Update source file formatting with latest version of black.
- Cpplint unit test updated to match new default warnings from the cpplint 2.0 release.
- Cpplint 2.0 released on 2024-10-06.
- <https://github.com/cpplint/cpplint/blob/2.0.0/CHANGELOG.rst#20-2024-10-06>
- Fix command used to run ruff tool.
- Ruff v0.5.0 requires use of `ruff check` instead of `ruff`.
- Update list of files in clean script to fix shellscript warnings about globs for files with hyphens.
- Ignore new pylint finding for too many positional arguments.
Finding showed up with pylint 3.3.0.
- Change default value of deep get method to match valid type for reduce function.

## v0.9.4 - 2022-04-25

Expand Down
2 changes: 1 addition & 1 deletion statick_tool/plugins/discovery/ros_discovery_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def deep_get(
cls,
dictionary: Union[str, Dict[Any, str]],
keys: str,
default: Optional[str] = None,
default: str = "",
) -> Any:
"""Safe way to check for a value in a nested dict.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ def test_cpplint_tool_plugin_scan_valid():
package["headers"] = []
package["cpplint"] = "cpplint"
issues = ctp.scan(package, "level")
print(f"Line: {issues[2].message}")
assert len(issues) == 4
assert len(issues) == 5
assert issues[2].filename == os.path.join(
os.path.dirname(__file__), "valid_package", "test.c"
)
Expand Down

0 comments on commit a57a20c

Please sign in to comment.