Skip to content
Closed
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
6 changes: 4 additions & 2 deletions pytest_examples/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ExamplesConfig:
ruff_select: list[str] | None = None
ruff_ignore: list[str] | None = None
white_space_dot: bool = False
first_party: list[str] | None = None
"""If True, replace spaces with `·` in example diffs."""

def black_mode(self):
Expand Down Expand Up @@ -69,10 +70,11 @@ def ruff_config(self) -> tuple[str, ...]:

if self.upgrade:
select.append('UP')
if self.isort:
if self.isort and 'I' not in select:
select.append('I')

if self.ruff_ignore:
if self.first_party:
args.append(f'--first-party={",".join(self.first_party)}')
Comment on lines -75 to +77
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks wrong.

ignore.extend(self.ruff_ignore)

if select:
Expand Down
Loading