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

Disable black #567

Merged
merged 12 commits into from
Apr 24, 2024
Merged

Disable black #567

merged 12 commits into from
Apr 24, 2024

Conversation

purva-thakre
Copy link
Collaborator

Description

Fixes #547

Checklist

Before marking your PR ready for review, make sure you checked the following locally. If this is your first PR, you might be notified of some workflow failures after a maintainer has approved the workflow jobs to be run on your PR.

Additional information is available in the documentation.

  • Use ruff and pylint for errors related to code style and formatting.
  • Verify all previous and newly added unit tests pass in pytest.
  • Check the documentation build does not lead to any failures. Sphinx build can be checked locally for any failures related to your PR
  • Use linkcheck to check for broken links in the documentation
  • Use doctest to verify the examples in the function docstrings work as expected.

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.1%. Comparing base (a040822) to head (a744e38).
Report is 6 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #567   +/-   ##
======================================
  Coverage    98.1%   98.1%           
======================================
  Files         162     162           
  Lines        3112    3112           
  Branches      760     760           
======================================
  Hits         3054    3054           
  Misses         37      37           
  Partials       21      21           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@purva-thakre
Copy link
Collaborator Author

purva-thakre commented Apr 24, 2024

I am not too sure about disabling black while allowing ruff.

I have disabled black from formatting all .py files. As ruff is expected to be a drop-in replacement for black, the question I can't answer here is: Will ruff format . work after merging this?

https://docs.astral.sh/ruff/formatter/#ruff-format

Before and after making the changes in this diff, ruff format . did not force any new changes. I tried forcefully changing the length of a line but this was caught by ruff check.

  1. Need to forcefully make a change that will be caught by ruff format .
  2. Also, make a change that is a known deviation from black in ruff.

@purva-thakre purva-thakre marked this pull request as ready for review April 24, 2024 13:41
@purva-thakre
Copy link
Collaborator Author

purva-thakre commented Apr 24, 2024

Going to go ahead and mark this PR as ready. Forcefully made a change and ruff formatted it.

Made Change Ruff formatted as
image image

black doesn't try to format any of the .py files regardless of the change made.

If someone tries to use black . in toqito, it will give provide message No Python files are present to be formatted. Nothing to do 😴.

@purva-thakre purva-thakre requested a review from vprusso April 24, 2024 13:46
Copy link
Owner

@vprusso vprusso left a comment

Choose a reason for hiding this comment

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

LGTM!

@purva-thakre purva-thakre merged commit d700299 into master Apr 24, 2024
34 checks passed
@purva-thakre purva-thakre deleted the disable_black branch April 24, 2024 14:03
@purva-thakre purva-thakre added this to the v1.0.8 milestone Apr 24, 2024
purva-thakre added a commit that referenced this pull request Apr 25, 2024
* Update pylint requirement from 3.0.3 to 3.1.0

Updates the requirements on [pylint](https://github.com/pylint-dev/pylint) to permit the latest version.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v3.0.3...v3.1.0)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* add black as dependency + exclude all py files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

Disable black formatter
2 participants