8000 Lint on GitHub Actions via pre-commit by hugovk · Pull Request #159 · python/python-docs-theme · GitHub
[go: up one dir, main page]

Skip to content

Lint on GitHub Actions via pre-commit #159

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

Merged
merged 1 commit into from
Oct 13, 2023
Merged

Lint on GitHub Actions via pre-commit #159

merged 1 commit into from
Oct 13, 2023

Conversation

hugovk
Copy link
Member
@hugovk hugovk commented Oct 11, 2023

Add some pre-commit checks and apply autofixes. Also some minor config updates.

I also ran https://github.com/tox-dev/pyproject-fmt/ to reformat pyproject.toml to standardise it and make it much easier to compare with other repos. However, I didn't add it to pre-commit because it strips out the 3.13 classifier.

@hugovk hugovk marked this pull request as draft October 11, 2023 12:05
@hugovk
Copy link
Member Author
hugovk commented Oct 11, 2023

I triggered a test run on main and it also failed with only the exit code:

  python ./docsbuild-scripts/build_docs.py --quick --build-root ./build_root --www-root ./www --log-directory ./logs --group $(id -g) --skip-cache-invalidation --theme $(pwd) --language en --branch 3.12
  shell: /usr/bin/bash -e {0}
  env:
    FORCE_COLOR: 1
    pythonLocation: /opt/hostedtoolcache/Python/3.11.5/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.5/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.5/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.5/x64/lib
Error: Process completed with exit code 70.

https://github.com/python/python-docs-theme/actions/runs/6482294214/job/17601524907

Running the same command passes for me locally.

@hugovk hugovk marked this pull request as ready for review October 11, 2023 12:39
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 88
Copy link
Member

Choose a reason for hiding this comment

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

Can/should this specified with a --flag (or disabled if black already checks this)?
If we do we can get rid of this file.

< 8000 path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"> Copy link
Member Author

Choose a reason for hiding this comment

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

It could be done with a flag, but then it would only apply to that invocation with the flag, and not if we run Flake8 myself from the command line. This file means it is read by both.

We can't remove it either. Black will set some files to 88 chars wide, and then Flake8 would complain because it's over 80.

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough.

@@ -0,0 +1,2 @@
[flake8]
max-line-length = 88
Copy link
Member

Choose a reason for hiding this comment

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

Fair enough.

@hugovk hugovk merged commit bc3cf1b into python:main Oct 13, 2023
@hugovk hugovk deleted the lint branch October 13, 2023 05: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
0