Skip to content

Commit

Permalink
Added ruff. Fixes #849
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Mezentsev committed Jan 26, 2024
1 parent 5b48bdf commit 7b02d3a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
language_version: python3.11
args: ['--config', 'pyconfig.toml']
- repo: https://github.com/pycqa/isort
rev: 5.12.0
Expand Down
15 changes: 15 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
target-version = "py38"

[lint]
select = ['E', 'F']
ignore =[
'E402',
'E501',
'E711',
'E712',
'E741',
'F401',
'F541',
'F841',
'F901',
]
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_config_values(self, config: AWSConfigInfoWithCredsPartial) -> AWSConfigV
raise_invalid_credentials_error(fields=[["creds"]])
try:
auth.authenticate(creds=config.creds, region=MAIN_REGION)
except:
except: # noqa: E722
if isinstance(config.creds, AWSAccessKeyCreds):
raise_invalid_credentials_error(
fields=[
Expand Down

0 comments on commit 7b02d3a

Please sign in to comment.