-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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', |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 😂
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice to remove this.
Bit of tidying up.
Fixes #26 at the same time.