-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix auto-fixable trunk errors (#263)
* Add trunk to nav backend * Add code quality job to CI * Run trunk autoformatting on all failing files * Add .git-blame-ignore-revs * Remove broken pyright config from pyproject.toml * Ignore JSON under test search fixtures folder * Do not use mutable data structures for argument defaults * Remove unnecessary quotes * Export symbols using __all__ * Use double [[ ]] for bash * Run isort * Remove unnecessary double quotes * Disable oxipng * Wrap variables in curly brackets & double quotes * Fix included packages in pyproject.toml * Fix line length violations, spellings & heading numbers & add language to code block * Absolute paths instead of relative to appease pyright * Fix line length violations * Make sure variables are in scope before closing * Turn off B rules for ruff until later date * Fix line length violations, duplicate headings & missing language from code block * Tell trunk to ignore everything under /scripts for now * Fix import paths * Run isort & use caplog rather than incorrectly spying on function * Don't run markdown linting on LICENSE file * Update .git-blame-ignore-revs * Do not include scripts in pyright * Fix pyright unknown import symbol * Move bats folder under test folder * Fix import paths for pyright * Removed old bats dockerfile as it's not being used now
- Loading branch information
1 parent
bc8ceb9
commit 4eeb41c
Showing
61 changed files
with
628 additions
and
667 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
############################################################################### | ||
# Ignore specific revisions when using Git Blame | ||
# | ||
# The file should contain the full (40 char) commit hashes. Lines starting with | ||
# a hash are considered comments and can be used to explain what makes the | ||
# given commit(s) unimportant. | ||
# | ||
# You can call git blame with the --ignore-revs-file option to ignore all the | ||
# commits listed in this file. | ||
############################################################################### | ||
|
||
# Run trunk auto-formatting | ||
220ab8dc9367b6cf4c6d41a491a32c3c4e5c8eb2 | ||
|
||
# Ignore LICENSE re-formatting | ||
4e8229e076fec4c5013655a9950187bea9b354df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
exclude_dirs: ["tests"] | ||
exclude_dirs: [tests] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ runtimes: | |
# This is the section where you manage your linters. | ||
# (https://docs.trunk.io/check/configuration) | ||
lint: | ||
disabled: | ||
- oxipng | ||
definitions: | ||
- name: bandit | ||
direct_configs: [bandit.yaml] | ||
|
@@ -37,6 +39,10 @@ lint: | |
# Ignore test data JSON files | ||
- tests/data/**/*.json | ||
- tests/search_fixtures/**/*.json | ||
- scripts/** | ||
- linters: [markdownlint] | ||
paths: | ||
- LICENSE.md | ||
|
||
enabled: | ||
- [email protected] | ||
|
@@ -48,7 +54,6 @@ lint: | |
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected]: | ||
commands: | ||
- check-ast | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from .config import lookup_config | ||
from .geo_stats import lookup_geo_stats | ||
from .router import lookups_router | ||
from app.api.api_v1.routers.lookups.config import lookup_config | ||
from app.api.api_v1.routers.lookups.geo_stats import lookup_geo_stats | ||
from app.api.api_v1.routers.lookups.router import lookups_router | ||
|
||
__all__ = ("lookup_config", "lookup_geo_stats", "lookups_router") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
from fastapi import Depends, Request | ||
|
||
from app.api.api_v1.routers.lookups.router import lookups_router | ||
from app.api.api_v1.schemas.metadata import ApplicationConfig | ||
from app.core.lookups import get_config | ||
from app.db.session import get_db | ||
from .router import lookups_router | ||
|
||
|
||
@lookups_router.get("/config", response_model=ApplicationConfig) | ||
def lookup_config( | ||
request: Request, | ||
db=Depends(get_db), | ||
): | ||
def lookup_config(request: Request, db=Depends(get_db)): | ||
"""Get the config for the metadata.""" | ||
return get_config(db) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
from pydantic import BaseModel | ||
|
||
|
||
TaxonomyData = Mapping[str, Mapping[str, Union[bool, Sequence[str]]]] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""AWS Helper classes.""" | ||
|
||
import logging | ||
import os | ||
import re | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.