Skip to content

Commit

Permalink
working through test package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jtdub committed Jan 8, 2024
1 parent b8e36b7 commit 1b21448
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 28 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ jobs:
poetry install --no-interaction --no-root
poetry run mypy hier_config
poetry run pylint --rcfile=pylintrc hier_config
poetry run flake8 .
poetry run pytest
2 changes: 1 addition & 1 deletion hier_config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def add_child(
self.logs.append(f"Found a duplicate section: {list(self.path()) + [text]}")
return self.children_dict[text]

def path(self) -> Iterator[str]: # pylint: disable=no-self-use
def path(self) -> Iterator[str]:
yield from ()

def add_deep_copy_of(
Expand Down
8 changes: 4 additions & 4 deletions hier_config/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class Host:
host.remediation_config_filtered_text({"safe"}, set()})
"""

def __init__(
def __init__( # pylint: disable=dangerous-default-value
self,
hostname: str,
os: str,
hconfig_options: dict = None,
hconfig_options: dict = {},
):
self.hostname = hostname
self.os = os
Expand Down Expand Up @@ -175,8 +175,8 @@ def _load_from_file(name: str, parse_yaml: bool = False) -> Union[list, dict, st

return content

def _get_running_config(self) -> HConfig: # pylint: disable=no-self-use
def _get_running_config(self) -> HConfig:
return NotImplemented

def _get_generated_config(self) -> HConfig: # pylint: disable=no-self-use
def _get_generated_config(self) -> HConfig:
return NotImplemented
30 changes: 13 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ classifiers = [
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
PyYAML = ">= 5.4"
types-pyyaml = "^6.0.12.12"

[tool.poetry.group.dev.dependencies]
black = "^23.12.1"
flake8 = "^7.0.0"
pytest = "^7.4.4"
pytest-flake8 = "^1.1.1"
mypy = "^1.8.0"
pylint = "^3.0.3"
pytest-cov = "^4.1.0"
Expand Down
5 changes: 0 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ addopts =
-vv
--cov=hier_config --cov-fail-under=75 --cov-report=term-missing
--black
--flake8
; --pylint --pylint-ignore=tests
; --mypy

[flake8]
ignore = E501,W503,E203,F401


;[mypy]
;python_version = 3.8
;warn_unused_configs = True
Expand Down

0 comments on commit 1b21448

Please sign in to comment.