Skip to content

Commit

Permalink
chore(linter): replace black with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
catcombo committed Nov 23, 2024
1 parent 80f39b8 commit 5038fdc
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 420 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install

- name: Run linter
run: poetry run flake8
- run: poetry run ruff check

- name: Run tests
run: poetry run pytest
- run: poetry run ruff format --diff

- run: poetry run pytest
16 changes: 8 additions & 8 deletions .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jira2markdown/markup/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self, inline_markup: Forward, markup: Forward, usernames: dict):
self.inline_markup = inline_markup
self.markup = markup
self.usernames = usernames
self.init_kwargs = dict(inline_markup=inline_markup, markup=markup, usernames=usernames)
self.init_kwargs = {"inline_markup": inline_markup, "markup": markup, "usernames": usernames}

@property
def expr(self) -> ParserElement:
Expand Down
9 changes: 1 addition & 8 deletions jira2markdown/markup/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@ def action(self, tokens: ParseResults) -> str:
# Converts multiline text to one line,
# because markdown doesn't support multiline text in table cells
output = [
"|"
+ "|".join(
map(
lambda cell: cell.replace("\n", "<br>"),
map(self.markup.transform_string, row),
),
)
+ "|"
"|" + "|".join(self.markup.transform_string(cell).replace("\n", "<br>") for cell in row) + "|"
for row in lines
]

Expand Down
Loading

0 comments on commit 5038fdc

Please sign in to comment.