Skip to content

Commit

Permalink
chore(deps-dev): Bump ruff from 0.0.254 to 0.0.290 (#284)
Browse files Browse the repository at this point in the history
* chore(deps-dev): Bump ruff from 0.0.254 to 0.0.290

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.254 to 0.0.290.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.254...v0.0.290)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* big refactor of debian parser to appease ruff

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* more linter fixes

Signed-off-by: Will Murphy <will.murphy@anchore.com>

* more linter appeasing

Signed-off-by: Will Murphy <will.murphy@anchore.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Will Murphy <will.murphy@anchore.com>
  • Loading branch information
dependabot[bot] and willmurphyscode authored Sep 22, 2023
1 parent cd2f18e commit a4480b8
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 131 deletions.
38 changes: 19 additions & 19 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 @@ -76,7 +76,7 @@ types-requests = "^2.28.11.7"
mypy = "^1.1"
radon = ">=5.1,<7.0"
dunamai = "^1.15.0"
ruff = "^0.0.254"
ruff = ">=0.0.254,<0.0.291"
yardstick = {git = "https://github.com/anchore/yardstick", rev = "v0.7.0"}
tabulate = "0.9.0"

Expand Down
2 changes: 1 addition & 1 deletion src/vunnel/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def clear_provider(cfg: config.Application, provider_names: str, _input: bool, r
@click.argument("provider_names", metavar="PROVIDER", nargs=-1)
@click.option("--show-empty", default=False, is_flag=True, help="show providers with no state")
@click.pass_obj
def status_provider(cfg: config.Application, provider_names: str, show_empty: bool) -> None:
def status_provider(cfg: config.Application, provider_names: str, show_empty: bool) -> None: # noqa: C901
print(cfg.root)
selected_names = provider_names if provider_names else providers.names()

Expand Down
3 changes: 2 additions & 1 deletion src/vunnel/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def _normalize_name(name: str) -> str:
@dataclass
class Log:
slim: bool = os.environ.get("VUNNEL_LOG_SLIM", default="false") == "true"
level: str = os.environ.get("VUNNEL_LOG_LEVEL", default="INFO")
level: str = os.environ.get("VUNNEL_LOG_LEVEL", default="INFO") # noqa: RUF009, str is immutable so RUF009 does not apply
# see https://docs.astral.sh/ruff/rules/function-call-in-dataclass-default-argument/
show_timestamp: bool = os.environ.get("VUNNEL_LOG_SHOW_TIMESTAMP", default="false") == "true"
show_level: bool = os.environ.get("VUNNEL_LOG_SHOW_LEVEL", default="true") == "true"

Expand Down
6 changes: 3 additions & 3 deletions src/vunnel/providers/amazon/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import re
from collections import namedtuple
from html.parser import HTMLParser
from typing import ClassVar

import defusedxml.ElementTree as ET
import requests
Expand Down Expand Up @@ -96,8 +97,7 @@ def _get_alas_html(self, alas_url, alas_file, skip_if_exists=True):
if skip_if_exists and os.path.exists(alas_file): # read alas from disk if its available
self.logger.debug(f"loading existing ALAS from {alas_file}")
with open(alas_file, encoding="utf-8") as fp:
content = fp.read()
return content
return fp.read()

try:
self.logger.debug(f"downloading ALAS from {alas_url}")
Expand Down Expand Up @@ -210,7 +210,7 @@ def __init__(self):

class PackagesHTMLParser(HTMLParser):
_new_packages_tuple_ = ("id", "new_packages")
_arch_list_ = ["x86_64:", "noarch:", "src:"]
_arch_list_: ClassVar[list[str]] = ["x86_64:", "noarch:", "src:"]

def __init__(self):
self.fixes = []
Expand Down
Loading

0 comments on commit a4480b8

Please sign in to comment.