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

style: ruff format #638

Closed
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
3 changes: 3 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ extend-select = ["B", "I", "UP"]

[lint.isort]
known-third-party = ["tests"]

[format]
quote-style = "single"
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'yamllint', 'Linter for YAML files', ['Adrien Vergé'], 1)
]
man_pages = [('index', 'yamllint', 'Linter for YAML files', ['Adrien Vergé'], 1)]

# -- Build with sphinx automodule without needing to install third-party libs

Expand Down
8 changes: 4 additions & 4 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def build_fake_config(self, conf):
conf = {}
else:
conf = yaml.safe_load(conf)
conf = {'extends': 'default',
'rules': conf}
conf = {'extends': 'default', 'rules': conf}
return YamlLintConfig(yaml.safe_dump(conf))

def check(self, source, conf, **kwargs):
Expand All @@ -46,8 +45,9 @@ def check(self, source, conf, **kwargs):
rule_id = kwargs[key][2]
else:
rule_id = self.rule_id
expected_problems.append(linter.LintProblem(
kwargs[key][0], kwargs[key][1], rule=rule_id))
expected_problems.append(
linter.LintProblem(kwargs[key][0], kwargs[key][1], rule=rule_id)
)
expected_problems.sort()

real_problems = list(linter.run(source, self.build_fake_config(conf)))
Expand Down
Loading
Loading