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

final lint/format run through & update pre-commit #661

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

jGaboardi
Copy link
Member

@jGaboardi jGaboardi commented Nov 22, 2023

This PR:

To decide:

  • Within pyproject.toml, I am more leaning towards the mindset of omitting [tool.ruff.ignore] in pyproject.toml altogether and handling 99.9% of cases within files themselves (everything in the PR passes that way). However, I know others may think this is too strict. So yay or nay for keeping [tool.ruff.ignore]?

Once the PR is reviewed and merged the last step in #589 will be to enable pre-commit on triggered GHA

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #661 (074004b) into main (9e45960) will not change coverage.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #661   +/-   ##
=====================================
  Coverage   85.0%   85.0%           
=====================================
  Files        139     139           
  Lines      14889   14889           
=====================================
  Hits       12663   12663           
  Misses      2226    2226           
Files Coverage Δ
libpysal/cg/standalone.py 91.3% <100.0%> (ø)
libpysal/graph/_kernel.py 88.8% <100.0%> (ø)
libpysal/io/fileio.py 60.5% <100.0%> (ø)

@martinfleis
Copy link
Member

I am more leaning towards the mindset of omitting

If there are no global rules we want to disable then there's no reason to keep that section. But there is some minor compatibility issue with black I think. Some rules go against black, that is why they're disallowed. Otherwise you get to a dance between ruff and black with one making a change and the other reverting it.

@jGaboardi
Copy link
Member Author

This PR passes both black and ruff with no global rules (confirmed locally). But yes, I have experience in the past where black and ruff seem to countermand each other. Though recently, no.

@martinfleis
Copy link
Member

Okay. Let's give it a go without.

@jGaboardi jGaboardi merged commit 27c1f49 into pysal:main Nov 22, 2023
10 checks passed
@jGaboardi jGaboardi deleted the finalize_linting_setup branch November 22, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants