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

chore 🧹: PEP8 linting #149

Merged
merged 8 commits into from
Jun 9, 2023
Merged

chore 🧹: PEP8 linting #149

merged 8 commits into from
Jun 9, 2023

Conversation

dotysan
Copy link
Contributor

@dotysan dotysan commented Jun 3, 2023

Simply ran autopep8 --max-line-length=127 --in-place --recursive .

dotysan added 4 commits June 3, 2023 00:29
 - autopep8 --max-line-length=127 --in-place --recursive .
 - flake8-3.11 . --exclude=.venv,.eggs --max-line-length=127 --statistics --count
@dotysan dotysan changed the title PEP8 linting chore 🧹: PEP8 linting Jun 3, 2023
@subzero10
Copy link
Member

Cool! How do we make sure that all new code has gone through a linter before pushing to main branch?
Can we run this on the CI workflow and fail if code has not been linted?

@dotysan
Copy link
Contributor Author

dotysan commented Jun 6, 2023

I was about to create a 2nd github action, as I've done this before with flake8. But just now, I finally got tox performing the entire CI/tests. And from what I've learned, it will be a synch to add linting too. See upcoming PR...

@dotysan
Copy link
Contributor Author

dotysan commented Jun 8, 2023

So the first step is to approve this chore PR.

That way the code conforms to some basic level of PEP8.

Then we can begin auto-linting. I've definitely got ideas/examples in that realm too...

subzero10
subzero10 previously approved these changes Jun 8, 2023
@subzero10 subzero10 self-requested a review June 8, 2023 05:54
@subzero10 subzero10 dismissed their stale review June 8, 2023 05:54

Tests are failing.

@subzero10
Copy link
Member

I initially approved, but then noticed that tests are failing 🤔

@dotysan
Copy link
Contributor Author

dotysan commented Jun 8, 2023

Those tests ran successfully previously, so the error is apparently unrelated.

ERROR: Ignored the following versions that require a different python version: 5.3.0 Requires-Python >=3.8; 5.3.0rc1 Requires-Python >=3.8; 5.3.0rc2 Requires-Python >=3.8
ERROR: Could not find a version that satisfies the requirement kombu<6.0,>=5.3.0 (from versions: 0.1.0, 0.2.0, 0.9.0, 0.9.1, 0.9.2, 0.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0, 4.6.1, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 4.6.9, 4.6.10, 4.6.11, 5.0.0, 5.0.1, 5.0.2, 5.1.0b1, 5.1.0, 5.2.0rc1, 5.2.0, 5.2.1, 5.2.2, 5.2.3, 5.2.4, 5.3.0a1, 5.3.0b1, 5.3.0b2, 5.3.0b3)
ERROR: No matching distribution found for kombu<6.0,>=5.3.0
error: Command '['/opt/hostedtoolcache/Python/3.7.16/x64/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpcrtr8tc5', '--quiet', 'kombu<6.0,>=5.3.0']' returned non-zero exit status 1.
##[error]Process completed with exit code 1.

And both Celery (and its dependency kombu) were just released recently.

https://pypi.org/project/celery/#history
https://pypi.org/project/kombu/#history

Maybe we need a quick CI patch to pin those to older revs.

@dotysan
Copy link
Contributor Author

dotysan commented Jun 8, 2023

Yep that was it. Back-hacked my new logic from here:
https://github.com/dotysan/honeybadger-python/blob/be6fc44ff386b211b9990885e7af8e3b988a1f02/requirements.txt#L15-L18
Into here:
https://github.com/dotysan/honeybadger-python/blob/f02c3cd06d7089f40e5a21d2dce19f67a0a373da/setup.py#L8

I'll cherry-pick that commit into new PR too...

@subzero10 subzero10 merged commit 6d3fa01 into honeybadger-io:master Jun 9, 2023
@subzero10
Copy link
Member

Nice find, thanks!

@dotysan dotysan deleted the lint branch June 9, 2023 14:15
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.

2 participants