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

Feature/use ruff #38

Merged
merged 1 commit into from
Nov 23, 2024
Merged
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
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