Skip to content

Conversation

@BurnzZ
Copy link
Contributor

@BurnzZ BurnzZ commented Mar 29, 2022

TODO before releasing a new version

  • Run tox -e linters to fix all formatting issues and address any linting issues
  • Docs - Remove "`" in doc targets (reference)
  • add .git-blame-ignore-revs file

@codecov
Copy link

codecov bot commented Mar 29, 2022

Codecov Report

Merging #68 (5584951) into master (21b397c) will decrease coverage by 0.01%.
The diff coverage is 96.29%.

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
- Coverage   97.79%   97.78%   -0.02%     
==========================================
  Files          10       10              
  Lines         454      451       -3     
==========================================
- Hits          444      441       -3     
  Misses         10       10              
Impacted Files Coverage Δ
scrapy_poet/injection_errors.py 100.00% <ø> (ø)
scrapy_poet/injection.py 98.95% <93.75%> (ø)
scrapy_poet/__init__.py 100.00% <100.00%> (ø)
scrapy_poet/api.py 100.00% <100.00%> (ø)
scrapy_poet/cache.py 92.30% <100.00%> (ø)
scrapy_poet/downloader.py 100.00% <100.00%> (ø)
scrapy_poet/middleware.py 100.00% <100.00%> (ø)
scrapy_poet/overrides.py 95.00% <100.00%> (-0.13%) ⬇️
scrapy_poet/page_input_providers.py 95.31% <100.00%> (-0.08%) ⬇️
scrapy_poet/utils.py 100.00% <100.00%> (ø)
... and 1 more

@BurnzZ BurnzZ changed the title add precommit-hook configuration for linters Pre-Release: add precommit-hook configuration for linters, doc styles May 27, 2022
@BurnzZ BurnzZ mentioned this pull request May 27, 2022
2 tasks
@BurnzZ BurnzZ force-pushed the precommit-hooks branch from fc4a400 to e4a1cfb Compare June 20, 2022 05:16
@BurnzZ BurnzZ marked this pull request as ready for review June 20, 2022 05:24
@BurnzZ BurnzZ requested review from Gallaecio and kmike and removed request for Gallaecio June 20, 2022 05:24
@BurnzZ
Copy link
Contributor Author

BurnzZ commented Jun 20, 2022

Hi @kmike @Gallaecio , I've updated this previously draft-PR so it can be included in the upcoming release. :)


import scrapy

from example.autoextract import ProductPage
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we can make example imports relative, the way they are placed by black (?) look a bit weird otherwise. This applies to other files here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @kmike , I'm afraid I don't follow as this line is using relative imports. Perhaps what you meant was that the linter (i.e. https://github.com/PyCQA/isort) moved this line from down below to up here?

Copy link
Member

@Gallaecio Gallaecio Jun 20, 2022

Choose a reason for hiding this comment

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

I think he meant from ...autoextract import ProductPage (I might have gotten the number of dots wrong 🙂).

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps what you meant was that the linter (i.e. https://github.com/PyCQA/isort) moved this line from down below to up here?

sorry, that was exactly my concern

I think he meant from ...autoextract import ProductPage

yes, that's what I meant :) Sorry folks for an unclear message. It's not a big deal.

pyproject.toml Outdated
@@ -0,0 +1,6 @@
[tool.black]
line-length = 120
Copy link
Member

Choose a reason for hiding this comment

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

I know this is bikeshedding, but maybe we should stick to either 79 or 88; those two values seem to be the most common standards.

https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length motivation seems reasonable to me.

Copy link
Member

@Gallaecio Gallaecio Jun 20, 2022

Choose a reason for hiding this comment

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

I have a personal preference of 79, but I gave up imposing it in shared repositories a long time ago, so +1 to any choice.

And I am not sure 79 and 88 are the most common, PyCharm is probably the most popular Python IDE, and it enforces 120 by default, which probably has an effect on users.

PS: I also have a personal preference for blue over black, but I won’t push for that here either :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a strong opinion here. Black's default of 88 seems reasonable. Updated it to use line length of 88.

@kmike kmike merged commit 753da2a into master Jun 20, 2022
@BurnzZ BurnzZ deleted the precommit-hooks branch October 14, 2022 06:26
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.

4 participants