From 2a980a04e6e04896ac8964de7bee1a7dc45aee06 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Tue, 21 May 2024 17:52:13 -0400 Subject: [PATCH] last bits of fixes --- .github/workflows/build.yml | 2 ++ .github/workflows/pytest.yml | 2 ++ .trunk/configs/.yamllint.yaml | 3 +-- .trunk/trunk.yaml | 7 ++++- .../config/tests/fixtures/config/config.yml | 22 ++++++++-------- backend/endpoints/auth.py | 4 +-- examples/config.example.yml | 26 +++++++++---------- poetry.lock | 10 +++---- pyproject.toml | 2 +- 9 files changed, 43 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08d2063cb..5d610a853 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,8 @@ on: tags: - "[0-9]+.[0-9]+.[0-9]+*" +permissions: read-all + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 13008bbd0..98513552b 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -17,6 +17,8 @@ on: - "examples/*" - "frontend/**" +permissions: read-all + jobs: pytest: runs-on: ubuntu-latest diff --git a/.trunk/configs/.yamllint.yaml b/.trunk/configs/.yamllint.yaml index 184e251f8..04a75f3b4 100644 --- a/.trunk/configs/.yamllint.yaml +++ b/.trunk/configs/.yamllint.yaml @@ -1,7 +1,6 @@ rules: quoted-strings: - required: only-when-needed - extra-allowed: ["{|}"] + required: false key-duplicates: {} octal-values: forbid-implicit-octal: true diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 3cbab2263..a2b391755 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -25,7 +25,7 @@ lint: - git-diff-check # - hadolint@2.12.0 - isort@5.13.2 - - markdownlint@0.40.0 + # - markdownlint@0.40.0 # - mypy@1.10.0 - osv-scanner@1.7.3 - oxipng@9.1.1 @@ -38,6 +38,11 @@ lint: - trivy@0.51.2 - trufflehog@3.76.3 - yamllint@1.35.1 + ignore: + - linters: [ALL] + paths: + - src/__generated__/** + - docker/Dockerfile actions: enabled: - trunk-announce diff --git a/backend/config/tests/fixtures/config/config.yml b/backend/config/tests/fixtures/config/config.yml index 553c0250e..72a368b23 100644 --- a/backend/config/tests/fixtures/config/config.yml +++ b/backend/config/tests/fixtures/config/config.yml @@ -3,29 +3,29 @@ exclude: platforms: - - romm + - "romm" roms: single_file: names: - - info.txt + - "info.txt" extensions: - - xml + - "xml" multi_file: names: - - my_multi_file_game - - DLC + - "my_multi_file_game" + - "DLC" parts: names: - - data.xml + - "data.xml" extensions: - - txt + - "txt" system: platforms: - gc: ngc + gc: "ngc" versions: - naomi: arcade + naomi: "arcade" filesystem: - roms_folder: ROMS - firmware_folder: BIOS + roms_folder: "ROMS" + firmware_folder: "BIOS" diff --git a/backend/endpoints/auth.py b/backend/endpoints/auth.py index 03811f02e..a407a63c1 100644 --- a/backend/endpoints/auth.py +++ b/backend/endpoints/auth.py @@ -134,8 +134,8 @@ async def token(form_data: Annotated[OAuth2RequestForm, Depends()]) -> TokenResp @router.post("/login") def login( - request: Request, credentials=Depends(HTTPBasic()) -) -> MessageResponse: # nosec B008 + request: Request, credentials=Depends(HTTPBasic()) # noqa +) -> MessageResponse: """Session login endpoint Args: diff --git a/examples/config.example.yml b/examples/config.example.yml index 0c4f2fa19..7b8260cc7 100644 --- a/examples/config.example.yml +++ b/examples/config.example.yml @@ -1,7 +1,7 @@ exclude: # Exclude platforms to be scanned platforms: - - romm + - "romm" # Exclude roms or parts of roms to be scanned roms: @@ -10,11 +10,11 @@ exclude: single_file: # Exclude all files with certain extensions to be scanned extensions: - - xml + - "xml" # Exclude matched file names to be scanned names: - - info.txt - - ._* # Supports unix filename pattern matching + - "info.txt" + - "._*" # Supports unix filename pattern matching - "*.nfo" # Can also exclude files by extension ## Multi files games section @@ -22,30 +22,30 @@ exclude: multi_file: # Exclude matched 'folder' names to be scanned (RomM identifies folders as multi file games) names: - - my_multi_file_game - - DLC + - "my_multi_file_game" + - "DLC" # Exclude files within sub-folders. parts: # Exclude matched file names to be scanned from multi file roms # Keep in mind that RomM doesn't scan folders inside multi files games, # so there is no need to exclude folders from inside of multi files games. names: - - data.xml - - ._* # Supports unix filename pattern matching + - "data.xml" + - "._*" # Supports unix filename pattern matching # Exclude all files with certain extensions to be scanned from multi file roms extensions: - - txt + - "txt" system: # Asociate different platform names to your current file system platform names platforms: # [your custom platform folder name]: [RomM platform name] - gc: ngc # In this example if you have a 'gc' folder, RomM will treat it like the 'ngc' folder - psx: ps + gc: "ngc" # In this example if you have a 'gc' folder, RomM will treat it like the 'ngc' folder + psx: "ps" # Asociate one platform to it's main version versions: - naomi: arcade + naomi: "arcade" filesystem: # The folder name where your roms are located - roms_folder: roms # For example if your folder structure is /home/user/library/roms_folder + roms_folder: "roms" # For example if your folder structure is /home/user/library/roms_folder diff --git a/poetry.lock b/poetry.lock index b1688f8b8..52128738b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1729,13 +1729,13 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "requests" -version = "2.31.0" +version = "2.32.2" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.2-py3-none-any.whl", hash = "sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c"}, + {file = "requests-2.32.2.tar.gz", hash = "sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289"}, ] [package.dependencies] @@ -2489,4 +2489,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "54f6d99a45e4d81716daf144fa59a6e5c269519c9939f4c76fab4b28f15e1fc7" +content-hash = "323b1951650e0387f1bcdd50dc86745576cc90651e9ab43bd29431aacc59c667" diff --git a/pyproject.toml b/pyproject.toml index 16b1c2492..4a62efe3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ authors = [ [tool.poetry.dependencies] python = "^3.11" -requests = "2.31.0" +requests = "^2.32.2" fastapi = "0.110.0" uvicorn = "0.29.0" gunicorn = "22.0.0"