Skip to content

Commit 5aedc04

Browse files
committed
chore: minor updates
1 parent c47ab45 commit 5aedc04

7 files changed

Lines changed: 12 additions & 19 deletions

File tree

.github/workflows/python_lint_and_test.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ jobs:
3232
- name: Run python style and linting tools
3333
run: |
3434
err=0
35-
echo pre-commit:
3635
pre-commit install
37-
pre-commit run --all-files --hook-stage pre-commit|| err=$?
36+
pre-commit run --all-files --hook-stage pre-commit || err=$?
3837
exit $err
3938
- name: Run tests with coverage
4039
run: |

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# manual stage - runs the same tools but modifies files
44
# run as: pre-commit run --all-files --hook-stage manual
55
repos:
6+
# See README.md for more information on this pre-commit hook
7+
# Please uncomment this hook if you are a Red Hat employee, and make sure you don't commit it back upstream
68
# - repo: https://gitlab.cee.redhat.com/infosec-public/developer-workbench/tools.git
79
# rev: rh-pre-commit-2.3.0
810
# hooks:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ For details on debugging the web interactions, see the `--pwdebug` option in the
178178

179179
### Linting and formatting rules
180180

181-
This project uses `pre-commit` to handle linting and formatting. The `pre-commit` tool reads its configuration from [`.pre-commit-config.yaml`](./.pre-commit-config.yaml)` and the configuration options for the individual linters and formatters can be found in the [`pyproject.toml`](./pyproject.toml) file.
181+
This project uses `pre-commit` to handle linting and formatting. The `pre-commit` tool reads its configuration from [`.pre-commit-config.yaml`](./.pre-commit-config.yaml) and the configuration options for the individual linters and formatters can be found in the [`pyproject.toml`](./pyproject.toml) file.
182182
The same configuration is used in CI.
183183

184184
To install and execute it locally, follow these steps:

logilica_cli/__main__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@
4242
"-o",
4343
"output_dir_path",
4444
type=click.Path(
45-
writable=True,
46-
file_okay=False,
47-
path_type=pathlib.Path,
48-
resolve_path=True,
45+
writable=True, file_okay=False, path_type=pathlib.Path, resolve_path=True
4946
),
5047
default=DEFAULT_OUTPUT_DIR,
5148
show_default=True,

logilica_cli/data_sources.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
@common_options
1111
@click.pass_context
1212
def data_sources(
13-
context: click.Context,
14-
username: str,
15-
password: str,
16-
domain: str,
17-
oauth: bool,
13+
context: click.Context, username: str, password: str, domain: str, oauth: bool
1814
) -> None:
1915
"""Synchronizes configuration of integrations with the configuration file.
2016

logilica_cli/update_gdoc.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,7 @@ def get_app_credentials_file(config: dict[str, any]) -> Path:
182182

183183

184184
GPP_SIGNATURE = Callable[
185-
[
186-
Optional[str],
187-
Optional[Union[str, Literal[False]]],
188-
Optional[str],
189-
bool,
190-
bool,
191-
],
185+
[Optional[str], Optional[Union[str, Literal[False]]], Optional[str], bool, bool],
192186
Path,
193187
]
194188

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ select = [
2121
"E", # pycodestyle (flake8)
2222
"F", # pyflakes (flake8)
2323
"I", # isort
24+
"W505", # docstring line too long
2425
]
2526
ignore = ["E501"] # line length is covered by black
2627

@@ -30,9 +31,13 @@ known-first-party = ["logilica_cli"] # use separate section for project sources
3031
force-sort-within-sections = true # don't separate import vs from
3132
order-by-type = false # sort alphabetic regardless of case
3233

34+
[tool.ruff.lint.pycodestyle]
35+
max-doc-length = 88
36+
3337

3438
[tool.black]
3539
line-length = 88
40+
skip-string-normalization = false
3641
skip-magic-trailing-comma = false
3742
include = '\.pyi?$'
3843

0 commit comments

Comments
 (0)