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

drop 3.7 support, migrate to ruff format #28

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

davidhewitt
Copy link

Bit of tidying up.

Fixes #26 at the same time.

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

looks like this is using ruff format for the package itself, but doesn't remove/replace the use of black for formatting examples. Presumably that's the impactful change?

pyproject.toml Outdated
@@ -42,12 +42,12 @@ classifiers = [
'Framework :: Pytest',
'Topic :: Software Development :: Libraries :: Python Modules',
]
requires-python = '>=3.7'
requires-python = '>=3.8'
dynamic = ['version']
dependencies = [
'pytest>=7',
'black>=23',
Copy link
Member

Choose a reason for hiding this comment

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

i guess you can remove black as a dependency now?

Copy link
Author

Choose a reason for hiding this comment

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

black_format still exists as a function for now, I want to push that as a follow up PR to keep a smaller diff. "ruff format" in this context is for our CI, not for the functionality 😂

Copy link
Author

Choose a reason for hiding this comment

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

Actually I'll just add here as a follow-up commit.

pyproject.toml Outdated
target-version = 'py38'

[tool.ruff.format]
quote-style = "single"
Copy link
Member

Choose a reason for hiding this comment

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

Can we use consistent quotes, double quotes would probably better, but we're using single quotes else where

@@ -205,21 +214,6 @@ def _insert_print_args(
triple_quotes_prefix_re = re.compile('^ *(?:"{3}|\'{3})', re.MULTILINE)


def find_print_line(lines: list[str], line_no: int) -> int:
Copy link
Member

Choose a reason for hiding this comment

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

nice to remove this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/test_run_examples.py::test_ruff_error fails with latest ruff 0.1.2
2 participants