-
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.
Merge pull request #2 from climatepolicyradar/feature/pdct-1395-fix-t…
…runk-issues Feature/pdct 1395 fix trunk issues
- Loading branch information
Showing
8 changed files
with
23 additions
and
13 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
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,2 +1,2 @@ | ||
# https://bandit.readthedocs.io/en/latest/config.html | ||
exclude_dirs: ["unit_tests", "integration_tests", "test", "tests"] | ||
exclude_dirs: [unit_tests, integration_tests, test, 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 |
---|---|---|
|
@@ -28,6 +28,7 @@ lint: | |
# Hadolint seems to have excessive memory use on Mac. | ||
# Disable until we can investigate further. | ||
- hadolint | ||
|
||
definitions: | ||
- name: bandit | ||
direct_configs: [bandit.yaml] | ||
|
@@ -39,6 +40,7 @@ lint: | |
- linters: [cspell] | ||
paths: | ||
- .trunk/configs/cspell.json | ||
- .gitignore | ||
|
||
enabled: | ||
- [email protected] | ||
|
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,2 +1 @@ | ||
|
||
__version__ = '0.1.0' | ||
__version__ = "0.1.0" |
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,11 +1,13 @@ | ||
import click | ||
|
||
|
||
@click.command() | ||
@click.option('--name', required=True, help='The name to greet.') | ||
@click.version_option('0.1.0', '--version', '-v', help='Show the version and exit.') | ||
@click.option("--name", required=True, help="The name to greet.") | ||
@click.version_option("0.1.0", "--version", "-v", help="Show the version and exit.") | ||
def greet(name): | ||
"""Simple program that greets NAME.""" | ||
click.echo(f'Hello {name}!') | ||
click.echo(f"Hello {name}!") | ||
|
||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
greet() |
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,9 +1,10 @@ | ||
|
||
from click.testing import CliRunner | ||
|
||
from gcf_data_mapper.cli import greet | ||
|
||
|
||
def test_greet(): | ||
runner = CliRunner() | ||
result = runner.invoke(greet, ['--name', 'World']) | ||
result = runner.invoke(greet, ["--name", "World"]) | ||
assert result.exit_code == 0 | ||
assert result.output.strip() == 'Hello World!' | ||
assert result.output.strip() == "Hello World!" |