Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: enable flake8-blind-except in ruff #641

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[lint]
extend-select = ["B", "I", "UP"]
extend-select = ["B", "BLE", "I", "UP"]

[lint.isort]
known-third-party = ["tests"]
6 changes: 3 additions & 3 deletions yamllint/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def extend(self, base_config):
def parse(self, raw_content):
try:
conf = yaml.safe_load(raw_content)
except Exception as e:
except yaml.YAMLError as e:
raise YamlLintConfigError(f'invalid config: {e}') from e

if not isinstance(conf, dict):
Expand All @@ -94,7 +94,7 @@ def parse(self, raw_content):
base = YamlLintConfig(file=path)
try:
self.extend(base)
except Exception as e:
except AssertionError as e:
raise YamlLintConfigError(f'invalid config: {e}') from e

if 'ignore' in conf and 'ignore-from-file' in conf:
Expand Down Expand Up @@ -142,7 +142,7 @@ def validate(self):
for id in self.rules:
try:
rule = yamllint.rules.get(id)
except Exception as e:
except ValueError as e:
raise YamlLintConfigError(f'invalid config: {e}') from e

self.rules[id] = validate_rule_conf(rule, self.rules[id])
Expand Down
Loading